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
#!/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 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 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 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 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 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 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 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 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 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
[Desktop Entry] | |
Name=IntelliJ | |
Comment=The Best Java and Polyglot IDE | |
Exec=/home/cristobal/Applications/idea-<version>/bin/idea.sh | |
Icon=/home/cristobal/Applications/idea-<version>/bin/idea.png | |
Terminal=false | |
StartupNotify=true | |
Type=Application | |
Categories=Development;IDE; |