Skip to content

Instantly share code, notes, and snippets.

@aackerman
aackerman / lebowski.coffee
Created February 19, 2015 19:44
lebowski.coffee
# Description:
# Get a random quote from The Big Lebowski.
#
# Dependencies:
# "htmlparser": "1.7.6"
# "soupselect": "0.2.0"
# "underscore": "1.3.3"
# "underscore.string": "2.3.0"
_ = require("underscore")
@tbrianjones
tbrianjones / free_email_provider_domains.txt
Last active May 4, 2024 17:03
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 10, 2024 17:12
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
module PAS
RedisConfig = File.join(Rails.root, "config", "redis.yml")
def self.redis
return @redis if @redis
@redis = Redis.new(YAML::load(File.open(RedisConfig)))
end
def self.redis=(redis)
@redis = redis
`brew install redis`
`sudo mate /Library/LaunchDaemons/org.redis.redis-server.plist`
...enter content...
`sudo launchctl load /Library/LaunchDaemons/org.redis.redis-server.plist`
`sudo launchctl start org.redis.redis-server`