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| [alias] | |
| verbs = !git log --pretty=format:'%s' | cut -d \" \" -f 1 | sort | uniq -c | sort -nr |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| // Quickly create Funcs that memoize expensive computations. | |
| // | |
| // In this example, ExpensiveMethod is only called once! | |
| // | |
| // var cached = CachedFunc.Create ((int x, string y) => x + ExpensiveMethod (y)); | |
| // for (int i = 0; i < 1000; i++) | |
| // cached (123, "hello"); | |
| public static class CachedFunc | |
| { |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using MonoTouch.Foundation; | |
| using MonoTouch.UIKit; | |
| using System.Drawing; | |
| using MonoTouch.CoreGraphics; | |
| using MonoTouch.CoreAnimation; | |
| using MonoTouch.AVFoundation; |
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| extension Array { | |
| func first() -> Element? { | |
| if isEmpty { | |
| return nil | |
| } | |
| return self[0] | |
| } | |
| func last() -> Element? { |
| // See: https://devforums.apple.com/message/1000934#1000934 | |
| import Foundation | |
| // Logic | |
| operator prefix ¬ {} | |
| @prefix func ¬ (value: Bool) -> Bool { | |
| return !value | |
| } |