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
#BASIC | |
alias ls='ls -G' | |
alias ll='ls -l' | |
export LSCOLORS=gxfxcxdxbxegedabagacad | |
#PATH | |
export PATH=/usr/sbin:$PATH | |
export PATH=/usr/local/php5/bin:$PATH | |
export PATH=/usr/local/mysql/bin:$PATH |
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 | |
cd ~ | |
mkdir link | |
cd link | |
ln -s /private/etc/apache2 apache2 | |
ln -s /private/var/log/apache2 apache2_log | |
ln -s ~/Library/Scripts scripts | |
ln -s ~/Library/Services services | |
ln -s /private/etc/hosts hosts | |
ln -s /Library/WebServer/Documents/ Documents |
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 Asset_Instance extends Fuel\Core\Asset_Instance {} | |
class Cache_Handler_Json extends Fuel\Core\Cache_Handler_Json {} | |
class Cache_Handler_Serialized extends Fuel\Core\Cache_Handler_Serialized {} | |
class Cache_Handler_String extends Fuel\Core\Cache_Handler_String {} | |
class Cache_Storage_Apc extends Fuel\Core\Cache_Storage_Apc {} | |
abstract class Cache_Storage_Driver extends Fuel\Core\Cache_Storage_Driver {} | |
class Cache_Storage_File extends Fuel\Core\Cache_Storage_File {} | |
class Cache_Storage_Memcached extends Fuel\Core\Cache_Storage_Memcached {} |
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
alias ll='ls -al --show-control-chars' | |
alias ls='ls --show-control-chars' | |
eval `ssh-agent` | |
ssh-add .ssh/id_rsa |
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
#include <iostream> | |
#include <fstream> | |
#include <sstream> | |
using namespace std; | |
int main(int argc, char* argv[]) | |
{ | |
ifstream file(argv[1]); // pass file name as argment | |
string linebuffer; |
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
/* | |
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind | |
*/ | |
if (!Function.prototype.bind) { | |
Function.prototype.bind = function (oThis) { | |
if (typeof this !== "function") { | |
// closest thing possible to the ECMAScript 5 internal IsCallable function | |
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); | |
} | |
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
if [ -f ~/.bashrc ] ; then | |
. ~/.bashrc | |
fi |
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 | |
AUTHOR=$(git config user.name) | |
DATE=$(date +%F) | |
git log --no-merges --format="%cd" --date=short --no-merges --author="$AUTHOR" --all | sort -u | while read DATE ; do | |
if [ $DATE != "" ] | |
then | |
echo | |
echo [$DATE] | |
fi | |
GIT_PAGER=cat git log --no-merges --format=" %s" --since="${DATE} 00:00:00" --until="${DATE} 23:59:59" --author="$AUTHOR" --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
// 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
git log --since=midnight --remotes --branches --numstat --pretty="%H" | awk '(NF==3 && $3 !~ /\.meta$/ && $3 ~ /script/) {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}' |
OlderNewer