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 | |
cd ~/ | |
mkdir .git-completion | |
wget -O ./.git-completion/prompt.sh https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh --no-check-certificate | |
wget -O ./.git-completion/completion.sh https://raw.github.com/git/git/master/contrib/completion/git-completion.bash --no-check-certificate | |
echo " | |
#git completion | |
source ~/.git-completion/completion.sh |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 $count(obj){ | |
var childs = []; | |
if (!obj) return 0; | |
switch($type(obj)){ | |
case 'number' : return obj; | |
case 'function': | |
return ((obj+"").test(/[{]([\W]*[\w]+[\W\w]*)[}]/)) ? 1: 0; | |
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/sh | |
#========== | |
# Settings | |
#========== | |
# Is this shell runing in cygwin (1/0) | |
cygwin=0; | |
# Drive containing www folder (only needed for cygwin users) |
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(window,undef){ | |
//get a new XMLHttpRequest object | |
function getXHR(){ | |
//for IE: | |
if (window.ActiveXObject){ | |
try{ //newer version | |
return new ActiveXObject('MSXML2.XMLHTTP'); | |
}catch (e){//older version |
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 | |
class JSClass{ | |
/** | |
* @var array a container for all of the Class's members and methods. | |
*/ | |
private $params = array(); | |
/** | |
* @param array $params a list of members and methods to assign to the Class | |
* @access private |
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 BreakException(){} | |
function Break(){throw new BreakException;} | |
(function(window,undef){ | |
window['$each'] = function(obj,func,bind){ | |
try{ | |
switch (typeOf(obj)){ | |
case 'object': |
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 | |
/** | |
*Benchmark class, it's a good solution for testing your web applications and scripts! | |
*also it can be a permanent tool you can integrate into your systems that will indicate the performance of your app/script etc. | |
* Test Time and memory consumption! | |
* Example usage: | |
* | |
* <code> | |
* require('Benchmark.class.php'); | |
* Benchmark::startTimer(); |
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
div.tip{ | |
margin:100px 150px; | |
width:25px; | |
height:25px; | |
border:1px solid orange; | |
border-radius:50%; | |
background:linear-gradient(top, #f9f44a 2%, #ffa51e 61%, #d17308 100%); | |
position:relative; | |
cursor:pointer; | |
} |
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
div.tip{ | |
margin:100px 150px; | |
width:25px; | |
height:25px; | |
border:1px solid orange; | |
border-radius:50%; | |
background:linear-gradient(top, #f9f44a 2%, #ffa51e 61%, #d17308 100%); | |
position:relative; | |
cursor:pointer; | |
} |
OlderNewer