Skip to content

Instantly share code, notes, and snippets.

View srathbun's full-sized avatar

Spencer Rathbun srathbun

View GitHub Profile
@srathbun
srathbun / .ctags
Created April 18, 2013 20:27
This is a working ctags config for use with vim and javascript. Note that if there is any busted options in this config, ctags will not use *any* of the other options! This means you cannot use comments or blank lines in this file!
--recurse=yes
--tag-relative=yes
--exclude=.git
--regex-Javascript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\{/\5/o,object/
--regex-Javascript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\5/f,function/
--regex-Javascript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*\[/\5/a,array/
--regex-Javascript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[^"]'[^']*/\5/s,string/
--regex-Javascript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*(true|false)/\5/b,boolean/
--regex-Javascript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*[0-9]+/\5/n,number/
--regex-Javascript=/(,|(;|^)[ \t]*(var|let|([A-Za-z_$][A-Za-z0-9_$.]+\.)*))[ \t]*([A-Za-z0-9_$]+)[ \t]*=[ \t]*.+([,;=]|$)/\5/v,variable/
@srathbun
srathbun / gist:4708226
Created February 4, 2013 17:39
continuous tailing of a log file
#!/bin/bash
crash[1]="disconnected"
crash[2]="38290209"
tail --follow=name log.log | while read line; do
for c in "${#crash[@]}"
do
#echo "Crash Word:" $c
if [[ "$item" == *"$c"* ]]; then
echo "RiotShield has crashed."
echo "Killing RiotShield."
@srathbun
srathbun / my.ini
Created July 13, 2012 19:28
Current MySql test settings
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options