Skip to content

Instantly share code, notes, and snippets.

@willurd
willurd / web-servers.md
Last active April 28, 2025 14:34
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@tylerneylon
tylerneylon / learn.lua
Last active April 26, 2025 14:17
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
@ToastShaman
ToastShaman / SftpServiceTest.java
Created November 13, 2013 18:40
Using an embedded Apache MINA SSHD server in a unit test to verify that your code is able to upload a file through SFTP. This unit tests uses JSch as the client to speak to an embedded Apache MINA sftp server and verifies that the upload of a text file was successful.
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
@kyledrake
kyledrake / ferengi-plan.txt
Last active January 10, 2025 14:02
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@rogerallen
rogerallen / run.sh
Last active February 21, 2021 23:49
NVIDIA Jetson/ChrUbuntu TK1 Minecraft Commandline
#!/bin/sh
#
# script to run minecraft on ARM linux. for reference:
#
# http://rogerallen.github.io/jetson/2014/07/31/minecraft-on-jetson-tk1/
# https://devtalk.nvidia.com/default/topic/764821/embedded-systems/minecraft-on-the-jetson-tk1/
# https://gist.github.com/rogerallen/91526c9c8be1a82881e0
#
# !!! YOU MUST PERSONALIZE ALL OF THIS INFO !!!
@mikemanger
mikemanger / indieroyale.user.js
Last active December 6, 2016 03:10
Indie Royal Collection Labeler
// ==UserScript==
// @name Indie Royale Bundle Labeler
// @include http://www.indieroyale.com/collection
// @updateURL https://gist.githubusercontent.com/ohmanger/ca837343473033b1d9bb/raw
// @downloadURL https://gist.githubusercontent.com/ohmanger/ca837343473033b1d9bb/raw
// @grant none
// @version 1.3.1
// ==/UserScript==
function irbl_add_global_styles() {
@mikemanger
mikemanger / indieroyalebundlehider.user.js
Last active December 6, 2016 03:16
Hides bundles you don't own from your Indie Royale collection page
// ==UserScript==
// @name Indie Royale Bundle Hider
// @description Hides bundles you don't own from your collection page
// @include http://www.indieroyale.com/collection
// @updateURL https://gist.githubusercontent.com/ohmanger/71334947a6f7470ef16e/raw
// @downloadURL https://gist.githubusercontent.com/ohmanger/71334947a6f7470ef16e/raw
// @grant none
// @version 1.1.1
// ==/UserScript==
@mikemanger
mikemanger / desura-game-labeler.user.js
Last active December 6, 2016 03:15
Displays titles on your Desura collection page
// ==UserScript==
// @name Desura Game Labeler
// @include http://www.desura.com/collection
// @updateURL https://gist.githubusercontent.com/ohmanger/b057f444cd2d5205bdfc/raw
// @downloadURL https://gist.githubusercontent.com/ohmanger/b057f444cd2d5205bdfc/raw
// @require https://gist.githubusercontent.com/BrockA/2625891/raw
// @grant none
// @version 1.2.2
// ==/UserScript==
@mikemanger
mikemanger / humble-bundle-key-cache.user.js
Last active January 20, 2018 20:45
Caches your Humble bundle key list
// ==UserScript==
// @name Humble Bundle key cache
// @include https://www.humblebundle.com/home*
// @updateURL https://gist.githubusercontent.com/mikemanger/b5bb71c9b9a1ac70b7ad/raw
// @downloadURL https://gist.githubusercontent.com/mikemanger/b5bb71c9b9a1ac70b7ad/raw
// @grant GM_setValue
// @grant GM_getValue
// @run-at document-end
// @version 1.1.4
// ==/UserScript==
@dferg
dferg / howto-install-docker-on-proxmox-4.md
Last active October 15, 2021 16:23
HOWTO: Install Docker on Proxmox 4