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
# Relies on log format: | |
# [Wed Aug 26 00:00:00 2015] [error] [client 123.45.67.8] Error message here | |
cat /var/log/apache2/error.log | awk '{out=$9;for(i=9;i<=NF;i++){out=out" "$i}; print out}' | sed s/,\ referer.*// | sort | uniq -c | sort -nr |
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
/* FontAwesome Variable List | |
* | |
* Usage: | |
* .input.username { | |
* &:before { | |
* font-family: $icon-font; | |
* content: $fa-user; | |
* } | |
* } | |
*/ |
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
var icons = {}; | |
var ignore = ['fa-lg', 'fa-fw', 'fa']; | |
$('.container i.fa').each(function() { | |
var val, icon_name, icon_value, i; | |
val = window.getComputedStyle($(this).get(0), ':before').getPropertyValue('content'); | |
icon_name = $(this).attr('class').split(' ')[1]; | |
console.log(icon_name); | |
charcode = val.charCodeAt(0).toString(16); | |
icons[icon_name] = charcode; |
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 | |
if [ ! -z "$1" ]; then | |
if [ ! -d "$1" ]; then | |
mkdir "$1" | |
mkdir "$1/bin" | |
mkdir "$1/docs" | |
mkdir "$1/tests" | |
mkdir "$1/$1" | |
touch "$1/README.md" |
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
from fabric.api import * | |
env.roledefs = {} | |
env.passwords = {} | |
def patch_ssl(): | |
sudo('apt-get update') | |
sudo('apt-get install openssl1.0.0 -y') | |
sudo('/etc/init.d/apache2 restart') |
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
python -m SimpleHTTPServer 80 |
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
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W\}%c %{g}]' |
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 | |
if [ "$EUID" != "0" ]; then | |
echo "You must be root" | |
exit 1; | |
fi | |
wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit && chmod +x /usr/local/bin/phpunit | |
echo "$(which phpunit)" |
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
a2971b1 (HEAD, master) Commit # {10} [Curtis Mattoon] | |
0 0 file_10 | |
feb3de8 Commit # {9} [Curtis Mattoon] | |
0 0 file_9 | |
cc74178 Commit # {8} [Curtis Mattoon] | |
0 0 file_8 | |
bfcbc72 Commit # {7} [Curtis Mattoon] |
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
# The basic command that gets run | |
sed -n '/CREATE TABLE.*table/,/UNLOCK TABLES/p' full_database_backup.sql > table.sql |
OlderNewer