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
| -- Remember to seed outside the function i.e. at top of your script | |
| -- especially on OSX otherwise you will get the same permutations. | |
| -- math.randomseed(os.time()) | |
| -- More info http://lua-users.org/wiki/MathLibraryTutorial | |
| function random(min, max) | |
| if (max == null) then | |
| max = min | |
| min = 0 | |
| end |
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
| public class JavaTutorial10 { | |
| public static void main(String[] args) { | |
| String value = "abc"; | |
| // 1. Strings are not null terminated in java | |
| System.out.println(value.toCharArray()); | |
| System.out.println(""); |
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 |
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
| 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
| #!/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
| #!/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 | |
| ########################## | |
| # 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 | |
| # | |
| # 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
| { | |
| "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" | |
| ], |
OlderNewer