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
# Dependencies | |
# | |
# $ gem install icalendar | |
# | |
# Usage | |
# | |
# $ git clone https://gist.github.com/5104840.git f1calendar | |
# $ ruby f1calendar/f1calendar.rb | |
# | |
# FORMULA 1 GRANDE PRÊMIO DO BRASIL 2015 - Sao Paulo - 2015-11-13 12:00:00 UTC - Practice 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
# Install bzr | |
brew install bzr | |
# Pull down bzr repo | |
bzr branch lp:~ymishkov/live-f1/live-f1-libevent | |
cd live-f1-libevent | |
# Install dependancies | |
brew install autoconf automake pkg-config gettext libevent |
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
# start_time is a #datetime column, Postgres stores as a timestamp, we need to use date_part to extract 'year' | |
Event.select("date_part('year', start_time)").uniq | |
# Spits out | |
# SELECT DISTINCT date_part('year', start_time) FROM "events" |
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
# git clone https://gist.github.com/daz/5411271 live-f1-recipe | |
# brew install live-f1-recipe/live-f1.rb | |
require 'formula' | |
class LiveF1 < Formula | |
homepage 'https://launchpad.net/live-f1' | |
version '0.2.11-libevent' | |
url 'https://github.com/daz/live-f1/archive/libevent.zip' | |
sha1 '1fa0dbfadf2d144a1f9af8a075822de7fd324bde' |
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
// keymaster.js | |
// (c) 2011-2012 Thomas Fuchs | |
// keymaster.js may be freely distributed under the MIT license. | |
(function(e){function f(e,t){var n=e.length;while(n--)if(e[n]===t)return n;return-1}function l(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function h(e){for(t in r)r[t]=e[c[t]]}function p(e,t){var i,o,u,l,c;i=e.keyCode,f(a,i)==-1&&a.push(i);if(i==93||i==224)i=91;if(i in r){r[i]=!0;for(u in s)s[u]==i&&(m[u]=!0);return}h(e);if(!m.filter.call(this,e))return;if(!(i in n))return;for(l=0;l<n[i].length;l++){o=n[i][l];if(o.scope==t||o.scope=="all"){c=o.mods.length>0;for(u in r)if(!r[u]&&f(o.mods,+u)>-1||r[u]&&f(o.mods,+u)==-1)c=!1;(o.mods.length==0&&!r[16]&&!r[18]&&!r[17]&&!r[91]||c)&&o.method(e,o)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function d(e){var t=e.keyCode,n,i=f(a,t);i>=0&&a.splice(i,1);if(t==93||t==224)t=91;if(t in r){r[t]=!1;for(n in s) |
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
# Because we have some old legacy users in the database, we need to | |
# override #has_secure_passwords' method for checking if a password is valid. | |
# We first ask if the password is valid, and if it throws an InvalidHash | |
# exception, we know that we're dealing with a legacy user, so we check the | |
# password against the SHA1 algorithm that was used to hash the password in | |
# the old database. | |
#SOURCES OF SOLUTION: | |
# http://stackoverflow.com/questions/6113375/converting-existing-password-hash-to-devise | |
# https://github.com/binarylogic/authlogic/blob/master/lib/authlogic/crypto_providers/sha512.rb |
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
# http://www.xbsd.nl/pub/osx-pl2303.kext.tgz | |
sudo cp -R osx-pl2303.kext /System/Library/Extensions/ | |
cd /System/Library/Extensions | |
sudo chmod -R 755 osx-pl2303.kext | |
sudo chown -R root:wheel osx-pl2303.kext | |
cd /System/Library/Extensions | |
sudo kextload ./osx-pl2303.kext | |
sudo kextcache -system-cache |
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
; CNAME | |
calendar 1 IN CNAME ghs.googlehosted.com | |
drive 1 IN CNAME ghs.googlehosted.com | |
mail 1 IN CNAME ghs.googlehosted.com | |
sites 1 IN CNAME ghs.googlehosted.com | |
video 1 IN CNAME ghs.googlehosted.com | |
; MX | |
@ 1 IN MX 10 aspmx3.googlemail.com | |
@ 1 IN MX 1 aspmx.l.google.com |
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
# Dependencies | |
# | |
# $ gem install mechanize | |
# | |
# Usage | |
# | |
# $ git clone https://gist.github.com/8501219.git f1teams | |
# $ ruby f1teams/f1teams.rb | |
# | |
# Red Bull Racing |
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
ifconfig | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' |