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
# Download desktop-resolution wallpapers from http://psiupuxa.com/ | |
# into the current directory. | |
require 'nokogiri' | |
require 'open-uri' | |
require 'openssl' | |
require 'uri' | |
# Disable SSL verification. Ruby SSL cert bundle isn't installed on Windows by default. | |
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE |
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
class Contact < ActiveRecord::Base | |
... | |
def after_create | |
if Hook.hooks_exist?('new_contact', self) | |
Resque.enqueue(Hook, self.class.name, self.id) | |
# To trigger directly without Resque: Hook.trigger('new_contact', self) | |
end | |
end |
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
counter = 0; | |
window.onkeydown = function(e){konamicode(e.which)} | |
function konamicode(button) | |
{ | |
var code = new Array(38,38,40,40,37,39,37,39,66,65); | |
if(code[counter] === button) | |
{ |