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
############# Aliases ############## | |
#AMP | |
alias php.ini='subl /usr/local/etc/php/5.4/php.ini' | |
alias httpd.conf='subl /etc/apache2/httpd.conf' | |
alias vhosts='subl /private/etc/apache2/extra/httpd-vhosts.conf' | |
alias mysql=/usr/local/mysql/bin/mysql | |
alias mysqladmin=/usr/local/mysql/bin/mysqladmin |
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
#!/usr/bin/env python | |
import urllib, sys, bs4 | |
print bs4.BeautifulSoup(urllib.urlopen("http://data.alexa.com/data?cli=10&dat=s&url="+ sys.argv[1]).read(), "xml").find("REACH")['RANK'] |
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 | |
# Expand globs to null when there are no matches | |
shopt -s nullglob | |
# Look for either a '<subdir>/console' or a 'symfony' file | |
until | |
file=(*/console symfony); [[ -f "$file" ]] && php "$file" "$@" && exit; | |
do | |
[[ "$PWD" == "/" ]] && break; |
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 | |
/** | |
*@Annotation | |
*/ | |
class AnnotatedDescription | |
{ | |
public $value; | |
public $type; | |
public $desc; | |
} |
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
# File: <appname>/management/commands/rmpyc.py | |
# management and commands directories must be python packages (each must have a __init__.py file) | |
from django.core.management.base import BaseCommand, CommandError | |
from subprocess import Popen, STDOUT, PIPE | |
import shlex, os | |
class Command(BaseCommand): | |
def handle(self, *args, **options): |
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
#!/usr/bin/env python | |
class Eid(object): | |
def __get__(self,instance,owner): | |
return "Eid-Ul-Fitr " | |
class Salutation(object): | |
def __get__(self,instance,owner): | |
return "Mubarak!" |
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
$entityManager = $this->getDoctrine()->getEntityManager(); | |
$user = new User(); | |
$user->setAddress("Khulna"); | |
$user->setBio("Good guy!"); | |
$user->setEmail("masnun@gmail.com"); | |
$user->setName("Masnun"); | |
$user->setIdentityProvider("facebook"); | |
$user->setProviderId("masnun"); | |
$user->setPhone("8801711960803"); |
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="custom" | |
# Example aliases |
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
Lighthouse: ~/Codes/compare | |
→ time python test.py | |
python test.py 0.05s user 0.01s system 96% cpu 0.067 total | |
Lighthouse: ~/Codes/compare | |
→ time php test.php | |
php test.php 0.56s user 0.03s system 99% cpu 0.598 total | |
Lighthouse: ~/Codes/compare | |
→ |
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
{ | |
"auto_indent": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Dayle Rees Color Schemes/LaravelDarker.tmTheme", | |
"draw_white_space": "all", | |
"fade_fold_buttons": false, | |
"fold_buttons": true, | |
"folder_exclude_patterns": | |
[ | |
".svn", |
OlderNewer