Skip to content

Instantly share code, notes, and snippets.

View thomasv314's full-sized avatar

Thomas Vendetta thomasv314

View GitHub Profile
@thomasv314
thomasv314 / common-mime-types.json
Created April 19, 2013 17:32
List of common #MIME types found on the internet pretty printed in #JSON.
{
".3dm": "x-world/x-3dmf",
".3dmf": "x-world/x-3dmf",
".a": "application/octet-stream",
".aab": "application/x-authorware-bin",
".aam": "application/x-authorware-map",
".aas": "application/x-authorware-seg",
".abc": "text/vnd.abc",
".acgi": "text/html",
".afl": "video/animaflex",
@thomasv314
thomasv314 / block-tor.sh
Created March 21, 2013 16:17
script that adapts mikhailian's implementation of blocking tor nodes... http://mikhailian.livejournal.com/48051.html
#! /bin/bash
# script to block tor nodes
# original credit for this goes to mikhailian: http://mikhailian.livejournal.com/48051.html
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
if [ "${1}" == "" ]; then
class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session
@chetan
chetan / yardoc_cheatsheet.md
Last active May 4, 2024 11:12
YARD cheatsheet