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 sh | |
bin_php=`which php` | |
for i in `git status --porcelain | awk '{ print $NF }'`; do | |
if [[ "$i" == *.php ]]; then | |
$bin_php -l "$i"; | |
fi | |
done |
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 sh | |
# Alex Lindeman | |
# 2015-11-11 | |
# Runs 'git fetch' for all repositories in a folder. | |
target_folder="/srv/git" | |
git_opts="--prune --no-recurse-submodules" | |
GIT_DISCOVERY_ACROSS_FILESYSTEM=1 |
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 +e | |
# wlan power saving | |
iw dev wlp3s0 set power_save on | |
# disable ethernet wake-on-lan | |
ethtool -s enp0s25 wol d | |
# audio codec power management | |
echo '1' > '/sys/module/snd_hda_intel/parameters/power_save' |
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
DocumentRoot /usr/share/cgit | |
<Directory "/usr/share/cgit"> | |
Require all denied | |
<FilesMatch "\.(css|gif|html?|ico|jpe?g|js|png|txt)$"> | |
Require all granted | |
</FilesMatch> | |
</Directory> | |
ScriptAlias /cgi-bin /usr/lib/cgit |
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 | |
IPTABLES=$(which iptables) | |
URL="http://report.rutgers.edu/DROP/attackers" | |
FILE="/tmp/rutgers-drop-list.txt" | |
CHAIN="RUTGERSDROP"; | |
# check if chain exists | |
$IPTABLES -L $CHAIN -n | |
if [ $? -eq 0 ]; then |
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
/** | |
* Author: Alex Lindeman <hello@ael.me> | |
* License: public domain | |
* | |
* Source: http://www.wmata.com/Images/Mrel/MF_Uploads/SafeTrack_Public.pdf | |
* Notices: | |
* - Information subject to change. Visit wmata.com/safetrack for updates. | |
* - No track work during inauguration week (January 15th - January 21st). | |
*/ |
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 | |
oldrev=$1 | |
newrev=$2 | |
refname=$3 | |
while read oldrev newrev refname; do | |
files=`git diff --name-only ${oldrev} ${newrev}` | |
objects=`git ls-tree --full-name -r ${newrev}` |
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
const https = require('https'); | |
const url = require('url'); | |
const slack_url = ''; // put your slack webhook URL here | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; | |
exports.handler = function(event, context) { |
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
function vslay() { | |
machines=`vagrant global-status | grep virtualbox | awk '{ print $1 }'` | |
echo "Destroying VMs: $(echo -n $machines | tr '\n' ' ')" | |
for i in $machines; do | |
vagrant destroy --force "$i" | |
done | |
} |
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
# error class: | |
class AttachableError < StandardError | |
attr_reader :data | |
def initialize(message = nil, data = nil) | |
@message = message | |
@data = data | |
end | |
def to_s |
OlderNewer