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
/** | |
* RequireJS Plugin - CSS Loader | |
* | |
* [ex.] | |
* define(['css!jquery-ui-css', 'jquery', 'jquery-ui'], { }); | |
* | |
* Its better to put 'css!' in front of other js dependencies to get | |
* faster loading speed | |
* | |
*/ |
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/bash | |
cd $HOME | |
wget -qO- http://outland.s3.amazonaws.com/outland.tar.gz | tar zxvf - | |
#git clone git://github.com/louisje/outland.git | |
outland/bin/ol-build | |
echo | |
echo "You need to \`source .bash_profile\` to make everything active" | |
echo |
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
/** | |
* sprintf() | |
*/ | |
(function() { | |
define(function() { | |
return function() { | |
var convert = function(match, nosign) { | |
if (nosign) { |
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
set nocompatible " not compatible with the old-fashion vi mode | |
set backspace=2 " allow backspacing over everything in insert nc >kkmode | |
set history=1000 " keep 1000 lines of command line history | |
set undolevels=100 | |
set ruler " show the cursor position all the time | |
set autoread " auto read when file is changed from outside | |
set wrap | |
set linebreak | |
set nolist | |
set hidden |
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
var logger = console.log;//<?php function logger($msg) {echo "\n".$msg;}; | |
function fibonacci($seq) { | |
if ($seq < 2) { | |
return $seq; | |
} else { | |
return fibonacci($seq - 1) + fibonacci($seq - 2); | |
} | |
} |
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
package acloudsvc.hadoop.examples; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import org.apache.commons.io.IOUtils; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.fs.FileSystem; |
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 | |
# usage: ./date_of_year.sh [ {year} ] | |
year=$1 | |
if test -z "$year"; then | |
year=`date +'%Y'` | |
fi | |
next_year=`echo "$year + 1" | bc` | |
now=`date +"%Y-%m-%d" -d "$year-01-01"` | |
end=`date +"%Y-%m-%d" -d "$next_year-01-01"`; |
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 | |
export DISPLAY=":2" | |
#sudo apt-get install -y tightvncserver | |
sudo apt-get install -y psmisc | |
#vncserver -kill $DISPLAY | |
sudo pkill x11vnc | |
sudo pkill Xvfb | |
### x-window ### | |
sudo apt-get install -y xfonts-cyrillic xfonts-100dpi xfonts-75dpi xvfb x11vnc xfce4 | |
#vncserver $DISPLAY -geometry 1372x874 -depth 24 |
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/bash | |
# morse.sh - generate morse code from ascii | |
# you can contact me at: | |
# --. .-. ..- .-.. --- ... .--.-. --. -- .- .. .-.. | |
# .-.-.- -.-. --- -- | |
# if you don't like my "dots" and "dashes" | |
# you can change them | |
# dot=. | |
# dash=_ |
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/bash | |
# | |
# <pre> | |
# | |
# Copyright (c) 2016 Louis Jeng <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to | |
# deal in the Software without restriction, including without limitation the | |
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
OlderNewer