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
| /** | |
| * Simple emitter with broadcast, emit, on event functions. | |
| */ | |
| app.factory('emitter', function ($rootScope) { | |
| var service = {}; | |
| angular.forEach(['broadcast' 'emit', 'on'], function (key) { | |
| service[key] = angular.bind($rootScope['$' + $key], $rootScope); | |
| }); | |
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
| { | |
| "color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme", | |
| "default_font_size": 10, | |
| "flatland_square_tabs": true, | |
| "font_face": "PragmataPro", | |
| "font_options": | |
| [ | |
| "subpixel_antialias", | |
| "no_round" | |
| ], |
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
| #!/usr/bin/env bash | |
| # | |
| # Resources: | |
| # - http://superuser.com/questions/490425/how-do-i-switch-between-java-7-and-java-6-on-os-x-10-8-2 | |
| # | |
| JAVA_VMS="/Library/Java/JavaVirtualMachines" | |
| ####################### | |
| # List available jdks # |
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
| #!/usr/bin/env bash | |
| ########################## | |
| # Export new jboss path # | |
| ######################### | |
| function export_path { | |
| # already same as exported variables(s) no changes needed | |
| if [ ! -z "$JBOSS_HOME" ] && \ | |
| [ "$JBOSS_HOME" = "$jboss_dir" ] && \ |
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
| #!/usr/bin/env bash | |
| # 0. cd into dir | |
| dir=$(dirname $0) | |
| cd $dir | |
| # 1. Sync from master | |
| git pull origin master | |
| # 2. Get SHA'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
| #!/usr/bin/env bash | |
| # From a fresh install of squeeze | |
| apt-get install ruby rubygems # Need ruby to use fpm | |
| gem1.8 install fpm --no-ri --no-rdoc | |
| apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p545.tar.gz | |
| tar -zxvf ruby-1.9.3-p545.tar.gz | |
| cd ruby-1.9.3-p545 |
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
| import javax.script.Invocable; | |
| import javax.script.ScriptEngine; | |
| import javax.script.ScriptEngineManager; | |
| import javax.script.ScriptException; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileReader; | |
| import java.time.LocalDateTime; | |
| import java.util.Date; | |
| import java.util.Properties; |
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
| import java.lang.reflect.InvocationTargetException; | |
| import java.util.WeakHashMap; | |
| import java.util.concurrent.TimeUnit; | |
| // @see http://java67.blogspot.sg/2012/07/java-program-fibonacci-series-with.html | |
| // @see https://github.com/raganwald/homoiconic/blob/master/2008-12-12/fibonacci.md | |
| public class FibonacciModule { |
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
| # Install Haxe using Brew and set the haxelib path | |
| brew install haxe | |
| haxelib setup /usr/local/Cellar/haxe/lib | |
| # Install lime | |
| haxelib install lime | |
| haxelib run lime setup | |
| # Install lime tools | |
| haxelib install format |
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
| #!/usr/bin/env python | |
| import sys | |
| from random import shuffle | |
| def main(): | |
| langs = ["coffe", "node", "lua", "python", "ruby", "php"] | |
| scores = {} | |
| for lang in langs: | |
| scores[lang] = 0 |