This file contains hidden or 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 -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}' |
This file contains hidden or 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
// Create element | |
var _ball = document.createElement('div'); | |
_ball.className = 'ball'; | |
// CSS | |
$(_ball).css({ | |
width: '40px', | |
height: '40px', | |
borderRadius: '50%', | |
position: 'fixed', |
This file contains hidden or 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
<div ng-controller='listController'> | |
<input type='text' ng-model='filterInput'> | |
<ul> | |
<li ng-repeat='item in items | filter:customFilter'> | |
{{ item.name }} | |
</li> | |
</ul> | |
</div> |
This file contains hidden or 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
// This is very common in big projects with a lot of scripts, | |
// when the programmer doesn't know where a function/action was called | |
// Assigning a reference | |
$.fn.val2 = $.fn.val; | |
// Overwriting the original function | |
$.fn.val = function(){ | |
console.log( this, arguments ); | |
console.log( 'Called from: ', arguments.callee.caller ); |
This file contains hidden or 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
// If you don't already have alloy.jmk generated do this inside your app/project folder | |
// $ alloy generate jmk | |
task("pre:compile", function(event,logger) { | |
var wrench = require("wrench"), | |
fs = require("fs"), | |
jade = require("jade"), | |
view_root = event.dir.project, | |
path = require("path"); |
This file contains hidden or 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
; C Major Chord | |
; By Gilberto Avalos | |
; You need Impromptu to run this script | |
; http://impromptu.moso.com.au/downloads.html | |
; Clear all | |
(au:clear-graph) | |
; Define piano instrument |