Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html id="ng-app" ng-app="app">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
@jexchan
jexchan / README.md
Created December 1, 2013 23:58 — forked from dergachev/README.md

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@jexchan
jexchan / daily_use.sh
Last active December 25, 2015 18:39
- append file extension in batch - removing file extension in batch, excute every 2 seconds
# append file extension in batch
ls /opt/optimize/store/barStore/*.tmp | sort -z -n | while read fname; do
echo "Appending : " + $fname;
mv $fname ${fname}.tmp
done
# removing file extension in batch, excute every 2 seconds
ls /opt/optimize/store/barStore/*.tmp | sort -z -n | while read fname; do
@jexchan
jexchan / build.gradle
Last active December 20, 2015 21:39
spring hadoop gradle template
apply plugin: 'java'
apply plugin: 'idea'
def versions = [
hadoop : "1.2.1",
spring : "3.2.3.RELEASE",
slf4j : "1.7.5",
commonsLogging : "1.1.3",
junit : "4.11",
@jexchan
jexchan / Sublime Shortcuts
Last active December 19, 2015 17:18 — forked from lucasfais/gist:1207002
SublimeText Shortcuts
h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)
h2. General
| *⌘T* | go to file |
| *⌘⌃P* | go to project |
| *⌘R* | go to methods |
| *⌃G* | go to line |
| *⌘KB* | toggle side bar |
| *⌘⇧P* | command prompt |
@jexchan
jexchan / markdown.xml
Created July 13, 2013 08:12 — forked from lg0/markdown.xml
Markdown Theme Special for SublimeTex
<!-- copy this to YOUR_THEME.tmTheme-->
<dict>
<key>name</key>
<string>diff: deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#EAE3CA</string>
@jexchan
jexchan / keyrepeat.shell
Created July 13, 2013 07:47 — forked from kconragan/keyrepeat.shell
Disable OSX-Like Context Menu
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text 2 if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
@jexchan
jexchan / frontendDevlopmentBookmarks.md
Created June 22, 2013 11:03 — forked from dypsilon/frontendDevlopmentBookmarks.md
Frontend Development Resources
@jexchan
jexchan / osx setting shell scripts
Last active September 8, 2019 11:21 — forked from brandonb927/osx-for-hackers.sh
OSX Setting Shell Scripts
# ~/.osx — http://mths.be/osx
# root check
if [[ $EUID -ne 0 ]]; then
echo "################################";
echo "## YOU ARE NOT RUNNING AS ROOT #";
echo "################################";
echo "#";
echo "# USAGE: sudo $0";
exit;
@jexchan
jexchan / basic_r_example.R
Created May 27, 2013 14:10
Basic R Examples
## BASICS
# Setup some scalars
x <- 3
y <- 4
z <- sqrt(x*x + y*y)
use.dots.in.names <- z - 5
# Print out z
print(z)
# The default action is print()