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 November 2, 2024 19:06
🗺️ 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:
/**
APPLY WELLS FARGO CC OFFERS
This script helps you apply all the Wells Fargo credit card deals automatically.
- Login to Wells Fargo and go to the credit card deals page -> https://web.secure.wellsfargo.com/auth/deals-portal
- Open 'Inspect Element'
- Paste this in the console and hit enter
*/
const BUTTON_CLASSNAME = 'AvailableDealTile2__activate___RMxY3';
const CLOSE_BUTTON_SELECTOR = 'svg > path[d="M0.417893 0.417893C0.0273689 0.808417 0.0273689 1.44158 0.417893 1.83211L7.58579 9L0.417894 16.1679C0.0273694 16.5584 0.0273694 17.1916 0.417894 17.5821C0.808418 17.9726 1.44158 17.9726 1.83211 17.5821L9 10.4142L16.1679 17.5821C16.5584 17.9726 17.1916 17.9726 17.5821 17.5821C17.9726 17.1916 17.9726 16.5584 17.5821 16.1679L10.4142 9L17.5821 1.83211C17.9726 1.44158 17.9726 0.808418 17.5821 0.417893C17.1916 0.027369 16.5584 0.027369 16.1679 0.417893L9 7.58579L1.83211 0.417893C1.44158 0.0273689 0.808418 0.0273689 0.417893 0.417893Z"]';
@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
@ChrisTaylorDeveloper
ChrisTaylorDeveloper / vs-code-php-debug-docker-xdebug.md
Last active July 6, 2024 07:40
How to configure the PHP-Debug extension for VS Code when serving the PHP project from Docker with xdebug

The Dockerfile

Only add the xdebug.remote_log line if you need to troubleshoot.

FROM php:7.1-apache

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
@mholt
mholt / macapp.go
Last active August 20, 2024 06:02
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 October 14, 2024 15:38
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