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| (ns kata.core-test | |
| (:require [clojure.test :refer :all])) | |
| ;; Langton's Ant - http://en.wikipedia.org/wiki/Langton's_ant | |
| ;; | |
| ;; At a white square, turn 90° right, flip the color of the square, move forward one unit | |
| ;; At a black square, turn 90° left, flip the color of the square, move forward one unit | |
| (def flip | |
| {:black :white |
| ### | |
| # Template for generate clean sample app at Padrino(Compass, SASS, Slim, Asset pipelines, CoffeeScript, etc…) & Angular | |
| # @requirements | |
| # => Bundler, Padrino-gen, npm, bower | |
| # @uses | |
| # => | |
| # padrino-gen project testapp --template padrino-sprocktes-compass.rb | |
| # bundle exec padrino rake -e production assets:precompile | |
| # bundle exec padrino start -e production |
| #!/bin/bash | |
| # Creates a ramdisk and start Xcode with the DerivedData stored in ramdisk. Also deletes the ramdisk and reset Xcode prefs. | |
| # xc_ramdisk.sh | |
| # - creates a ramdisk, set Xcode DerivedData to this disk and start Xcode. | |
| # - umount a ramdisk, set Xcode DerivedData to default | |
| # Stephan Burlot, Coriolis Technologies, http://www.coriolis.ch | |
| # | |
| # based on Alex Shevchenko xcode_ramdisk.sh script (https://gist.github.com/skeeet/2367298) | |
| # based on Diego Freniche xc-launch.sh script (https://github.com/dfreniche/xc-launch) |
| BYTES_PER_SECTOR=512 # AFAIK this is constant for Mac OSX RAM disks | |
| BYTES_PER_KILOBYTE=1024 | |
| BYTES_PER_MEGABYTE=1024*1024 | |
| BYTES_PER_GIGABYTE=1024*1024*1024 | |
| def bytes_to_sectors(bytes) | |
| sectors = (bytes / BYTES_PER_SECTOR).ceil | |
| return sectors | |
| end |
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| # | |
| # UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs | |
| # just run "sudo trimforce enable" to activate the trim support from now on! | |
| # | |
| # Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/) | |
| # Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/ | |
| # | |
| # Looks for "Apple" string in HD kext, changes it to a wildcard match for anything | |
| # | |
| # Alternative to http://www.groths.org/trim-enabler-3-0-released/ |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| #!/bin/sh | |
| # Create a RAM disk with same perms as mountpoint | |
| # Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions | |
| # Usage: sudo ./xcode_ramdisk.sh start | |
| USERNAME=$(logname) | |
| TMP_DIR="/private/tmp" | |
| RUN_DIR="/var/run" | |
| SYS_CACHES_DIR="/Library/Caches" |