Create a MySQL database named syslog and a table called events (you may run the app once to automatically create the table). For rsyslog, you may use something like this :
" Put this in .vim/bundle/master-window/plugin/ if you are using Pathogen | |
" Figure out a way to get this loaded if you aren't | |
if exists("master_window_loaded") | |
finish | |
endif | |
let master_window_loaded = 1 | |
function! FocusMasterWindow() | |
exe "1wincmd w" |
inotifywait -qm -e CLOSE_WRITE file.haml | while read ev; do | |
haml file.haml file.html | |
done | |
# use -r on inotifywait to watch directories recursively |
#!/bin/bash | |
DNS="$(cat /etc/resolv.conf)" | |
cp -f /etc/resolv.conf.head /etc/resolv.conf | |
echo "$DNS" >> /etc/resolv.conf |
source 'https://rubygems.org/' | |
gem "rake" | |
gem "haml" | |
gem "redcarpet" | |
gem "albino" | |
group :development do | |
gem "sass" | |
end |
#!/bin/bash | |
# A small example program for using the new getopt(1) program. | |
# This program will only work with bash(1) | |
# An similar program using the tcsh(1) script language can be found | |
# as parse.tcsh | |
# Example input and output (from the bash prompt): | |
# ./parse.bash -a par1 'another arg' --c-long 'wow!*\?' -cmore -b " very long " | |
# Option a |
#!/bin/bash | |
[ -z "$channel" ] && channel="#bobot" | |
[ -z "$server" ] && server="irc.freenode.net" | |
[ -z "$port" ] && port="6667" | |
[ -z "$user" ] && user=$USER | |
function irc_session () { | |
# Login phase | |
echo "USER $user 0 * :$user" | |
echo "NICK $user" |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2012 François Vaux <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
module DataAPI | |
class Application < ActiveRecord::Base | |
# Validations ... | |
attr_accessible :name, :domain, :description | |
has_many :rooms, dependent: :destroy | |
end |
#!/bin/bash | |
prop="Device Enabled" | |
id="$(xinput list | grep -i touchpad | sed 's/.*id=\([0-9]\+\).*/\1/')" | |
state="$(xinput list-props $id | grep "$prop" | cut -d: -f2 | sed 's/\s//g')" | |
if [ "$state" = 1 ]; then | |
xinput --set-prop $id "$prop" 0 | |
else |