Skip to content

Instantly share code, notes, and snippets.

View parse.rb
100 #@logger.info 'Calculating start and end time frames'
101 time_frame = p[i].gsub(/\D/, '')
102 @logger.error time_frame
103 st_i = '%04i' % (time_frame[0..3].to_i)
104 st_m = time_frame[0..3].to_i < 1200 ? 'AM' : 'PM'
105 en_i = '%04i' % time_frame[4..7].to_i
106 en_m = time_frame[4..7].to_i < 1200 ? 'AM' : 'PM'
107
108 s = time_frame[0..3].to_i
109 e = time_frame[4..7].to_i
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@mhussain
mhussain / update-dns.sh
Created May 8, 2012 — forked from smarthall/update-dns.sh
Linode dynamic DNS updating script
View update-dns.sh
#!/bin/sh
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script
# Uses curl to be compatible with machines that don't have wget by default
LINODE_API_KEY=licensekey
DOMAIN_ID=domainid
RESOURCE_ID=resourceid
WAN_IP=`curl -s ifconfig.me/ip`
if [ -f $HOME/.wan_ip.txt ]; then