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
# Event | |
class Event | |
type:null | |
callback:null | |
target:null | |
currentTarget:null | |
data:null | |
constructor:(p_type,p_callback)-> | |
@type = p_type | |
@callback = p_callback |
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
class Test | |
constructor:()-> | |
test1 = ["Apply", "Testing apply with coffeescript"] | |
test2 = "Testing apply with coffeescript" | |
@trace1.apply(@, [].concat(test1)) | |
@trace2.apply(@, [].concat(test2)) | |
trace1:(p_arg1, p_arg2)-> | |
console.log(p_arg1, p_arg2) |
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
class GoogleAnalytics | |
constructor:(p_id)-> | |
`(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');` | |
ga('create', p_id, 'auto') |
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
# | |
# toggle-file-symbols | |
# | |
'.platform-darwin .editor': | |
'shift-cmd-o': 'symbols-view:toggle-file-symbols' | |
'.platform-win32 .editor': | |
'shift-ctrl-o': 'symbols-view:toggle-file-symbols' | |
# |
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 | |
APACHE_DIR=/etc/apache2 | |
APACHE_USERS="$APACHE_DIR/users" | |
DOMAIN=$1 | |
WORK_DIR=$2 | |
HOSTS=/private/etc/hosts | |
LOCALHOST=127.0.0.1 | |
clear |
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
echo nl2br("<pre>".print_r($variable, true)."</pre>"); |
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 rows = 4; | |
var cols = 5; | |
var total = rows * cols; | |
var i = 0; | |
while(i<total) | |
{ | |
var posX = Math.floor(i/rows); | |
var posY = i % rows; | |