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
#check if a process named X is running | |
if [ -z "$(pidof X )" ] #CHANGE X WITH PROCESS NAME | |
then | |
# process was found | |
else | |
# process not found | |
fi | |
#ALSO |
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
$(el).ajax('image.svg', {}, 'html', function (data) { $("body").append(data) }); |
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
function makeRow($td1, $td2) { | |
//Create Row | |
$ret = "<tr>"; | |
//Loop trough functrion arguments | |
$index = 0; | |
//Stop when get_arg() evaluates to false | |
while (@$r = func_get_arg($index++)) { | |
//Add each argument as td | |
$ret .= "<td>$r</td>"; |
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
for x in {0..9}{0..9}{0..9}{0..9}; do | |
echo UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ $x | telnet localhost 30002 | egrep -v "Exiting|Wrong|I am"; | |
echo "Try $x"; | |
done |
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
function $tag(tag, n){return document.getElementsByTagName(tag)[n]} | |
function $id(id){return document.getElementById(id)} | |
function $cl(cl, n){return document.getElementsByClassName(cl)[n]} | |
function hasClass(className, targetClass){ | |
return (className).match(new RegExp(new RegExp('.*(\\b' + targetClass + '\\b).*'))) | |
} |
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 fs = require('fs'), | |
gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
sassMaps = require('gulp-sourcemaps'), | |
concat = require('gulp-concat'), | |
uglify = require('gulp-uglify'), |
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
function fact (num){ | |
this.cache = {} | |
//IF KEY NOT SET | |
if (!this.cache.hasOwnProperty(num)){ | |
//COMPUTE AND MEMORIZE | |
fact.cache[num] = num <= 1 ? 1 : num * fact(num-1); | |
} | |
return fact.cache[num]; | |
}; |
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
###/ CONFIG | |
HISTFILE=~/.histfile | |
HISTSIZE=1000 | |
SAVEHIST=1000 | |
# End of lines configured by zsh-newuser-install | |
# The following lines were added by compinstall | |
zstyle :compinstall filename '/home/ghzmdr/.zshrc' |
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
function debounce (fn, wait){ | |
var timeout; | |
return function(){ | |
var context = this, args = arguments | |
var later = function() { | |
timeout = null | |
fn.apply(context, args) | |
} | |
clearTimeout(timeout) | |
timeout = setTimeout(later, wait) |
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
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Oasis Theme/Oasis.tmTheme", | |
"file_exclude_patterns": | |
[ | |
"*.sublime-*" | |
], | |
"font_face": "Envy Code R", | |
"font_size": 8, | |
"ignored_packages": |
OlderNewer