⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
F12 | go to definition |
⌘KB | toggle side bar |
This file contains 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
/* | |
Simple Curve following code | |
Use mouse to draw a curve, then an ellipse will animate by following the curve | |
Controls | |
= to increase the speed | |
- to decrease the speed | |
s to show points | |
*/ |
This file contains 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
#!/bin/sh | |
# to use, save this file as .git/hooks/pre-commit in your git repo | |
# make sure to add execute permissions using: chmod +x .git/hooks/pre-commit | |
command -v pngcrush >/dev/null 2>&1 || { | |
echo "\033[1mPlease install pngcrush to reduce images size before commit\033[0m" | |
echo "Install pngcrush with the following:" | |
echo "\t \033[1mbrew install pngcrush\033[0m" | |
echo "OR" | |
echo "\t Site: \033[1m\033[4mhttp://pmt.sourceforge.net/pngcrush/\033[0m" | |
echo "\t Download: \033[1m\033[4mhttp://sourceforge.net/projects/pmt/files/\033[0m" |
This file contains 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
{ | |
"schema_version": "1.2", | |
"repositories": [ | |
"http://sublime.wbond.net/packages.json", | |
"https://github.com/yangsu/sublime-vhdl", | |
"https://github.com/SublimeText" | |
], | |
"package_name_map": { | |
"sublime-vhdl": "VHDL" | |
}, |
This file contains 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
#!/bin/sh | |
BASHRC='~/.bashrc' | |
BINDIR='~/local/bin' | |
mkdir -p $BINDIR | |
cd $BINDIR | |
# Install db4 | |
DBVERSION='db-4.8.30.NC' | |
DBBINPATH="$BINDIR/db4" |
This file contains 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
ArrayList<ArrayList<PVector>> shapes = new ArrayList<ArrayList<PVector>>(); | |
ArrayList<ArrayList<PVector>> paths = new ArrayList<ArrayList<PVector>>(); | |
ArrayList<PVector> current = new ArrayList<PVector>(); | |
ArrayList<Circle> circles = new ArrayList<Circle>(); | |
void setup() { | |
size(800, 800); | |
strokeWeight(2); | |
ellipseMode(RADIUS); | |
smooth(); |
This file contains 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
#!/bin/sh | |
################################################################################ | |
# | |
# Install Script for | |
# * Build Tools | |
# * Homebrew | |
# * Ruby, Io, Prolog, Scala, Erlang, Clojure, and Haskell using homebrew | |
# | |
# Author: Yang Su | |
# GitHub: https://github.com/yangsu |
This file contains 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
# Io Tutorial | |
# Math | |
1+1 # ==> 2 | |
2 sin # ==> 0.909297 | |
2 sqrt # ==> 1.414214 | |
# Variables | |
a := 1 # ==> 1 | |
a # ==> 1 | |
b := 2 * 3 # ==> 6 |
This file contains 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
properties = ['object oriented', 'duck typed', 'productive', 'fun'] | |
# => ["object oriented", "duck typed", "productive", "fun"] | |
properties.each {|property| puts "Ruby is #{property}."} | |
Ruby is object oriented. | |
Ruby is duck typed. | |
Ruby is productive. | |
Ruby is fun. | |
# => ["object oriented", "duck typed", "productive", "fun"] |
This file contains 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
42.class # => Fixnum | |
42.0.class # => Float | |
"foo".class # => String | |
[1,2,3].class # => Array | |
42.methods # shows the methods available on the object |
OlderNewer