This file contains hidden or 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 .htaccess rewrite rule used to make "apple.php" look like "apple.png" | |
RewriteEngine On | |
RewriteBase /fakeimg/ | |
RewriteRule ^apple.png$ apple.php |
This file contains hidden or 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 | |
# Triggers an error of params are empty. | |
username=${1:?"You must specify a username"} | |
password=${2:?"You must specify a password"} | |
echo "Setting password for ${username} to ${password}" | |
exit 0; |
This file contains hidden or 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 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
## INSTALL: | |
## | |
## 1A) git clone <GIT_URL> web_mode_gist && cd web_mode_gist | |
## OR | |
## 1B) wget <RAW_URL> | |
## 2. chmod +x emacs-web-mode.sh | |
## 3. ./emacs-web-mode.sh | |
## | |
EMACS="${HOME}/.emacs" |
This file contains hidden or 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
// ==UserScript== | |
// @name GitLab Fullscreen Diffs | |
// @version 0.1 | |
// @description Adds a 'fullscreen' button to GitLab diffs. | |
// @match http://* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// @grant none | |
// ==/UserScript== | |
/** | |
* Be sure to change the @match param above to suit your needs. |
This file contains hidden or 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 hidden or 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') |