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.
$ python -m SimpleHTTPServer 8000
# 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 |
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.
$ python -m SimpleHTTPServer 8000
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) = |
// =================== | |
// 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" | |
// --------------------------------------------------------------------------------- |
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 | |
} |
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 ""; | |
} |