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 | |
# alias site=". /Users/Olousouzian/Applications/site.sh" | |
if [[ $# -gt 0 ]]; then | |
cd /Users/Olousouzian/Sites/$1 && ls -la | |
else | |
cd /Users/Olousouzian/Sites && ls -la | |
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 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r | less |
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
tail -f app/logs/dev.log | awk ' | |
/(request|app)\.INFO/ {print "\033[36m" $0 "\033[39m"} | |
/(request|app)\.WARNING/ {print "\033[33m" $0 "\033[39m"} | |
/(request|app)\.ERROR/ {print "\033[31m" $0 "\033[39m"} | |
/(request|app)\.CRITICAL/ {print "\033[31m" $0 "\033[39m"} | |
' |
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
-- This following script / snippets can be used for import CSV file directly into MySQL | |
-- Advantages : very very fast (15.000.000 lines --> ~5min) | |
-- First use mysql cli binary with local-infile flag | |
-- mysql --local-infile -uThisisusername -pGreatPassword database | |
-- Clear table if you need to | |
TRUNCATE TABLE big_tables_numbers; |