Skip to content

Instantly share code, notes, and snippets.

@joycse06
joycse06 / LICENSE.txt
Created September 6, 2011 14:10 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@joycse06
joycse06 / test.sh
Created January 25, 2012 06:55 — forked from andrew8088/test.sh
This little script is an example script combining JSDev with running the script in the terminal via node.
#! /bin/sh
d=$(date)
jsdev <test.js >test.dev.js code equal:areEqual -comment "Development Version" -comment "Built: $d"
node test.dev.js
@joycse06
joycse06 / demo-list.html
Created June 20, 2012 09:52 — forked from rodneyrehm/demo-list.html
jQuery Snippets - jQuery.sortChildren()
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>sorting lists</title>
<script src="jquery-1.7.2.min.js"></script>
<script src="jquery.sortChildren.js"></script>
<script>
@joycse06
joycse06 / gist:3683885
Created September 9, 2012 11:23 — forked from tarex/gist:3683635
Clean Install – Mountain Lion OS X 10.8
@joycse06
joycse06 / snippet.xml
Created September 18, 2012 12:10 — forked from JeffreyWay/snippet.xml
Laravel Resource - Sublime Text 2 Snippet
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@joycse06
joycse06 / iosd
Created May 7, 2013 19:12 — forked from buritica/iosd
#!/bin/bash
# Open iPhone Simulator on default location for XCode 4.3 if found
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] &&
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
# Open iPhone Simulator on default location for XCode 4.2 if found
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] &&
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
#!/bin/sh
function print_bar {
GDONE=$1
GPROG='['
for i in $(seq 1 1 $GDONE)
do
GPROG=$GPROG'#'
done
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[])
{
int (^(^makeAdder)(int))(int) = ^(int toAdd) {
int (^fn)(int) = ^(int arg) {
return toAdd + arg;
};
return fn;
};