This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -m SimpleHTTPServer 8080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*- compile-command: "clang++ -std=gnu++0x -stdlib=libc++ -o remove_if remove_if.cpp" -*- | |
#include <iostream> | |
#include <vector> | |
using std::cout; | |
using std::endl; | |
int main (int, char **) { | |
std::vector<int> ints = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; | |
cout << "Range-based for loop:" << endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------- | |
# Clang configuration. | |
# -------------------- | |
using clang : osx | |
: xcrun clang -arch i386 -arch x86_64 -stdlib=libc++ -std=c++11 | |
; | |
using clang : ios | |
: xcrun clang -arch armv7 -arch armv7s -stdlib=libc++ -std=c++11 -miphoneos-version-min=5.0 -isysroot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find out how big the sparse-band-size is in a mounted volume | |
hdiutil info -verbose | grep band-size | |
# default Time Machine sparsbundle virtual-band-size = 16384 (8MB) | |
# create-sparsebundle's virtual-band-size = 262144 (128MB) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# creates a sparsebundle disk image with a 128MB band size | |
MACHINE_NAME=your-machine-name | |
echo $MACHINE_NAME | |
hdiutil create -size 900g -type SPARSEBUNDLE -nospotlight -volname "Backup of $MACHINE_NAME" -fs "Case-sensitive Journaled HFS+" -imagekey sparse-band-size=262144 -verbose ./$MACHINE_NAME.sparsebundle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cinder/app/AppCocoaTouch.h" | |
#include "cinder/Camera.h" | |
#include "cinder/gl/GlslProg.h" | |
using namespace ci; | |
using namespace ci::app; | |
using namespace std; | |
class ESTwoApp : public AppCocoaTouch { | |
public: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
TI-83+ code to use calculator as an intervalometer | |
Adapted from a comment on: | |
http://www.instructables.com/id/Turn-a-TI-Graphing-Calculator-into-an-Intervalomet/ | |
*/ | |
Disp "START IN " | |
Disp "SECONDS" | |
Prompt A | |
A*238 -> S |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>now</title> | |
</head> | |
<body> | |
<h1>This page is titled now.</h1> | |
<p>This is some content in a paragraph.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// loc = distance from center of distribution | |
float gaussian( float loc, float variance ) | |
{ | |
variance *= variance; | |
float a = loc * loc / ( 2.0 * variance ); | |
float b = exp( -a ); | |
float c = sqrt( PI * 2.0 * variance ); | |
return b / c; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" to shut down |