Skip to content

Instantly share code, notes, and snippets.

View booyaa's full-sized avatar
🏠
Working from home forevah!

Mark Sta Ana booyaa

🏠
Working from home forevah!
View GitHub Profile
# Generic configuration items (to be used as interpolations) in other
# apache filters.
[INCLUDES]
# Load customizations if any available
#after = apache-common.local
[Definition]
@booyaa
booyaa / trappist.sh
Created September 25, 2015 10:39
catch ctrl-c and exit (but not sigterm 9)
#!/bin/bash
trap -- 'cleanup; exit' SIGINT SIGTERM
cleanup()
{
echo cleaning up
echo now
}
@booyaa
booyaa / cktns.sh
Created September 25, 2015 10:29
tnsnames.ora entries checker
#!/bin/bash
# ported from korn shell version
# original: http://orafaq.com/scripts/unix/cktnsnms.txt
grep -v -e '^ ' -e'^\t' -e'^$' -e '^#' -e'^)' tnsnames.ora | sed 's/=//g' |
while read NAME
do
OUT=$(tnsping $NAME | grep '^OK')
if [ "${?}" = "1" ]; then
echo "${NAME}: Unable to ping"
else
`gotty top >/dev/null 2>&1 &`
@booyaa
booyaa / CreateFreeBSDVm.sh
Last active August 29, 2015 14:27 — forked from segrax/CreateFreeBSDVm.sh
Create a FreeBSD 64bit VM with VirtualBox, on FreeBSD, Accepting VNC Connections
# Create a VM named 'MyBSDBox' (64 bit FreeBSD)
VBoxManage createvm --ostype FreeBSD_64 --register --basefolder /vms --name MyBSDBox
# 1gig of memory, 1 CPU.. and set the network to bridged via EM0, emulating the 82540EM chipset
VBoxManage modifyvm MyBSDBox --memory 1024 --ioapic on --cpus 1 --chipset ich9 --nic1 bridged --nictype1 82540EM --bridgeadapter1 em0
# 20 gig Dynamic HDD image, on sata controller
VBoxManage createhd --size 20000 --filename "/vms/MyBSDBox/MyBSDBox.vdi"
VBoxManage storagectl MyBSDBox --name "SATA Controller" --add sata --controller IntelAhci --portcount 4
VBoxManage storageattach MyBSDBox --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "/vms/MyBSDBox/MyBSDBox.vdi"
#!/bin/bash
# thanks to #A&A
# based on https://github.com/sammachin/databurndown/blob/master/burndown.py
# awk floating code http://math-blog.com/2012/07/23/floating-point-arithmetic-in-the-bourne-again-shell-bash/
set -e
if [ -z "$AAUSER" ] || [ -z "$AAPASS" ]; then
echo set AAUSER and AAPASS environment variables
echo 'AAUSER needs to be your clueless account (ends with @a)'
exit
@booyaa
booyaa / gist:ba7a2eb57e93c3c0fbbc
Created June 24, 2015 07:54
diff of regular shell and tmux env vars
13c13
< ITERM_SESSION_ID=w0t7p0
---
> ITERM_SESSION_ID=w0t3p0
19,20c19,20
< PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/booyaa/Dropbox/Coding/go/bin
< PWD=/Users/booyaa
---
> PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/booyaa/Dropbox/Coding/go/bin:/Users/booyaa/Dropbox/Coding/go/bin
> PWD=/Users/booyaa/Dropbox/Coding/go/src/github.com/booyaa/dthulhu
17:28 <@tianon> the easy way to fix it is to just run ./markdownfmt.sh -w
memcached/content.md
grey - 0
green1 1-2
green2 3-5
green3 6-8
green4 9+
@booyaa
booyaa / gist:015c33f52bc1fa5ab77b
Last active February 6, 2016 21:04
vanity fairy
# aka my Go rank
```
top rank: 69% uk / 69% worldwide
20160205,United kingdom 25/36,Worldwide 573/826
20160114,United kingdom 376/1051,Worldwide 10808/33767
20151023,United kingdom 325/951,Worldwide 9431/31532
20150828,United kingdom 292/910,Worldwide 8377/29956
20150703,United kingdom 266/873,Worldwide 7541/28748