Skip to content

Instantly share code, notes, and snippets.

View lastlink's full-sized avatar
:octocat:
branching out

lastlink lastlink

:octocat:
branching out
View GitHub Profile
@markuman
markuman / README.md
Last active February 11, 2025 11:30
🗺️ OSM - self host the entire planet 🌎 in ~30 minutes 🚀

🗺️ OSM - self host the entire planet 🌎 in ~30 minutes 🚀

TL;DR

mkdir osm
wget -O osm/planet.mbtiles https://hidrive.ionos.com/api/sharelink/download?id=SYEgScrRe
podman run -ti --rm -p 9000:9000 --name sms -v $(pwd)/osm/:/data/ registry.gitlab.com/markuman/sms:latest
firefox http://localhost:9000

Crippling Facebook

Facebook works with advertisers to target you. These instructions are one of the many ways to begin crippling that relationship. When AI targeting is crippled, your psychosecurity improves :)

  1. On your desktop machine, goto https://accountscenter.facebook.com/ads/audience_based_advertising
  2. Maximize the browser window
  3. Press F12 and click on the Console tab
  4. Select the code below, copy it, paste it upon the Console line (The area next to the > character in the Console window), and press enter:
@natsumerinchan
natsumerinchan / bilibili-daily-task.yml
Created May 23, 2023 05:11
BiliBili Auto Checkin
# 每日任务
name: bilibili-daily-task
on:
workflow_dispatch: # 手动触发
schedule: # 计划任务触发
- cron: '0 0 * * *'
@porterde
porterde / ci.yml
Last active April 24, 2020 13:03
Work around to enable SonarCloud GitHub Actions to scan Vue.js files containing TypeScript
# Work around for issue described here:
# https://community.sonarsource.com/t/sonarqube-scanner-fails-to-analyze-vue-files-failed-to-parse-file-vue/17751/2
# https://jira.sonarsource.com/browse/MMF-1441
# This is for use in a GitHub Actions script using the SonarCloud GitHub Action which runs the scanner in Docker.
# If you're running Sonar scanner outside of GitHub Actions this hack certainly requires changes to make
# it work - I wish you luck!
#
# The basic idea in the hack is to run an Nginx docker container, alongside the Sonar scanner container,
# as a proxy for sonarcloud.io. Nginx intercepts the request to download the javascript scanning plugin
@mholt
mholt / macapp.go
Last active February 10, 2026 14:50
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@luyx2412
luyx2412 / google-drive.js
Last active July 14, 2021 13:03
React native login google, and google drive. Save storage and get again data when uninstall app.
/**
* Google Drive
* created by luyxtran264@gmail.com
*/
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
@LivingInSyn
LivingInSyn / lib.rs
Last active December 11, 2020 03:17
//using statements
use std::os::raw::c_char;
use std::ffi::CString;
//static var
static mut STRING_POINTER: *mut c_char = 0 as *mut c_char;
///structs
#[repr(C)]
pub struct SampleStruct {
pub field_one: i16,
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active January 6, 2026 23:02
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@wojteklu
wojteklu / clean_code.md
Last active February 24, 2026 04:53
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules