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() { | |
var NS = {}; | |
NS.Parent = function() { | |
var privateFoo = "Private foobar in Parent"; | |
function _foo(data) { | |
console.log("foo: " + data); | |
console.log(privateFoo); |
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($) { | |
$.fn.drags = function(opt) { | |
var $el; | |
opt = $.extend({handle: '', cursor: 'move', windowLock: true}, opt); | |
$el = ('' === opt.handle) ? this : this.find(opt.handle); | |
return $el |
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
tar czf new-files.tar.gz `git diff --name-only [COMMIT]` |
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
rsync -rtv --exclude-from="/full/path/to/rsync-exclude.txt" --delete /source /destination > rsync-log.txt |
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
<?php | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style type="text/css"> | |
.center { | |
text-align: center; | |
} | |
#myInput { |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style type="text/css"> | |
.center { | |
text-align: center; | |
} | |
#myInput { |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style type="text/css"> | |
.hide { | |
display: none; | |
} | |
</style> |
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 () { | |
$('h4 a').each(function() { | |
var $this = $(this), | |
content = $this.html(), | |
wordsArray = content.split(" "), | |
newcontent = []; | |
$this.html(''); | |
$.each(wordsArray, function(i, e) { |
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
/** | |
* Change only the text content of some element | |
* | |
* @method changeText | |
* @param element {Object} Element | |
* @param text {String} New text | |
* @param prepend {Boolean} If set to true, the text will be prepended to the element | |
* @return {Boolean} True if the change was successfull, false if not | |
*/ | |
function changeText(element, text, position) { |