Skip to content

Instantly share code, notes, and snippets.

View owskio's full-sized avatar

Theodore Robert Cackowski owskio

View GitHub Profile
@wenzhixin
wenzhixin / ubuntu14.04-command-line-install-android-sdk
Last active January 16, 2024 21:15
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@willurd
willurd / web-servers.md
Last active June 17, 2024 09: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
@jsakamoto
jsakamoto / httpd.fsx
Created May 17, 2013 03:30
Small http daemon by F# script. run "> fsi.exe httpd.fsx", then you can access http://localhost:8080/anycontents
open System
open System.IO
open System.Net
let root = @"c:\inetpub\wwwroot"
let listener = new HttpListener()
listener.Prefixes.Add "http://*:8080/"
listener.Start ()
let rec procreq ():(unit->unit) =
@muratg
muratg / monadicParser.fs
Created November 28, 2012 19:55
Monadic parsing in F# - translated from "Monadic parsing in Haskell" paper by Graham Hutton & Erik Meijer
// ===================
// Monadic parsing in F#
// by Murat Girgin
// Translated from "Monadic parsing in Haskell" paper by Graham Hutton & Erik Meijer
// Source: http://www.cs.nott.ac.uk/~gmh/pearl.pdf
// ===================
#nowarn "40"
// ---------------------------------------------------------------------------------
@theburningmonk
theburningmonk / TitleCaseImageFiles.fsx
Created October 19, 2011 22:01
A F# script to rename image files to be title cased
open System.IO
open System.Threading
let rec filesUnder basePath =
seq {
yield! Directory.GetFiles(basePath)
for subDir in Directory.GetDirectories(basePath) do
yield! filesUnder subDir
}
@owskio
owskio / WhereAmIandWhatsGoingOn.bash
Last active September 24, 2015 12:27
WhereAmIandWhatsGoingOn
function ?
{
padleft=""; padright=""; title="$(pwd)"
padleftcount="$(( ($COLUMNS - ${#title})/2 ))"
while [ ${#padleft} -lt $padleftcount ] ; do padleft+=" "; done
function progress { echo $((${#padleft} + ${#title} + ${#padright})); }
while [ $(progress) -lt $COLUMNS ] ; do padright+=" " ; done
echo -e "\n\e[1;4;37;40m${padleft}${title}${padright}\e[0m"
ls "$@" && echo "";
}