##Requirement for HMAC secret key
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
# https://vt4help.service-now.com/kb_view_customer.do?sysparm_article=KB0010740#linux | |
wget https://secure.nis.vt.edu/resources/downloads/pulse-8.2R5.i386.deb | |
sudo dpkg –i pulse-8.2R5.i386.deb | |
/usr/local/pulse/PulseClient.sh install_dependency_packages |
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
var soundex = function (s) { | |
var a = s.toLowerCase().split(''), | |
f = a.shift(), | |
r = '', | |
codes = { | |
a: '', e: '', i: '', o: '', u: '', | |
b: 1, f: 1, p: 1, v: 1, | |
c: 2, g: 2, j: 2, k: 2, q: 2, s: 2, x: 2, z: 2, | |
d: 3, t: 3, | |
l: 4, |
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
#!/usr/bin/env ruby | |
# List all keys stored in memcache. | |
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
require 'net/telnet' | |
headings = %w(id expires bytes cache_key) | |
rows = [] |
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
#I hate UPCASE data on the DB, so I made this to prevent it | |
before_save :titleize_fields | |
def titleize_fields | |
['name', 'paternal_lastname', 'maternal_lastname', 'spouse'].each do |m| | |
self.send("#{m}=", instance_eval(%Q{#{m}.titleize unless #{m}.nil?})) | |
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
class @Facebook | |
rootElement = null | |
eventsBound = false | |
@load: -> | |
unless $('#fb-root').size() > 0 | |
initialRoot = $('<div>').attr('id', 'fb-root') | |
$('body').prepend initialRoot |
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
module A | |
def do_something | |
puts 'A->do_something' | |
super | |
end | |
end | |
module B | |
def do_something | |
puts 'B->do_something' |
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
# | |
# PostgreSQL writes two optional commands to the database schema | |
# file, called db/structure.sql, that can only be run as a root | |
# database user. These are not needed actually, so comment them | |
# out automatically | |
# | |
# CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; | |
# COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; | |
# | |
namespace :db do |
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
upstream unicorn { | |
server unix:/tmp/unicorn.app_name.sock fail_timeout=0; | |
} | |
server { | |
server_name domain.com www.domain.com; | |
listen 80 default deferred; | |
root /opt/apps/app_path/public; |
NewerOlder