Skip to content

Instantly share code, notes, and snippets.

View doersino's full-sized avatar
🐛
Squashing bugs but sparing the cute ones!

Noah Doersing doersino

🐛
Squashing bugs but sparing the cute ones!
View GitHub Profile
@willurd
willurd / web-servers.md
Last active April 28, 2024 21:38
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
@maciakl
maciakl / gndn.cmd
Last active December 14, 2015 21:38
Go Nowhere, Do Nothing script. This script pretends to do work but does absolutely nothing. You do get to watch progress bars though. Also, it shows you how to create and call subroutines with parameters in Windows batchfiles.
@echo off
title GNDN
mode 65,25
color 4F
echo.
echo GNDN SUBSYSTEM RECALIBRATION
echo _________________________________________________________________
echo.
echo Level 1 Diagnostic
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@yoneken
yoneken / remove_CLI_tools.sh
Created August 7, 2012 11:03
Xcode Command Line Tools Uninstaller
# remove_CLI_tools.sh
# written by cocoanetics:http://www.cocoanetics.com/2012/07/you-dont-need-the-xcode-command-line-tools/
# modified by yoneken
#!/bin/sh
RECEIPT_FILE1=/var/db/receipts/com.apple.pkg.DevSDK.bom
RECEIPT_PLIST1=/var/db/receipts/com.apple.pkg.DevSDK.plist
RECEIPT_FILE2=/var/db/receipts/com.apple.pkg.clang.bom
RECEIPT_PLIST2=/var/db/receipts/com.apple.pkg.clang.plist
@zhpengg
zhpengg / skip_list.c
Created June 5, 2012 07:52
skiplist implementation in c
/* Skip Lists: A Probabilistic Alternative to Balanced Trees */
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#define SKIPLIST_MAX_LEVEL 6
typedef struct snode {
int key;
@ferryzhou
ferryzhou / mkdir_if_not_exist.m
Created March 31, 2012 22:59
matlab mkdir if not exist
function mkdir_if_not_exist(dirpath)
if dirpath(end) ~= '/', dirpath = [dirpath '/']; end
if (exist(dirpath, 'dir') == 0), mkdir(dirpath); end
end
@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@mncaudill
mncaudill / similar.php
Created October 31, 2011 05:33
PHP version of simple image similarity algorithm
<?php
# Algorithm found here: http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
$filename = 'image.jpg';
list($width, $height) = getimagesize($filename);
$img = imagecreatefromjpeg($filename);
$new_img = imagecreatetruecolor(8, 8);
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e