Skip to content

Instantly share code, notes, and snippets.

View prokizzle's full-sized avatar
🌮
IT'S TACO TIME!

Nick Prokesch prokizzle

🌮
IT'S TACO TIME!
View GitHub Profile
@prokizzle
prokizzle / rails_resources.md
Last active August 29, 2015 14:16 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@prokizzle
prokizzle / javascript_resources.md
Last active August 29, 2015 14:16 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@prokizzle
prokizzle / langoliers.rb
Last active August 29, 2015 14:15 — forked from robinsloan/langoliers.rb
Delete old tweets
#!/usr/bin/env ruby
require 'rubygems'
require 'twitter'
require 'json'
require 'faraday'
# things you must configure
PATH_TO_DROPBOX = "/Users/your_name/Dropbox/backup/tweets/" # you need to create this folder
TWITTER_USER = "your_twitter_username"
@prokizzle
prokizzle / default.conf
Last active March 28, 2023 02:10
Working Nginx Config for Faye over SSL
upstream faye_server {
server 127.0.0.1:9292;
}
server {
# listen 80;
listen 443 ssl;
server_name your-faye-server.com;
@prokizzle
prokizzle / account.rb
Created February 7, 2015 10:59
Redis Hash Example in Rails
class Account
def self.name(id)
account = $redis.hget("accounts", id)
if account.nil?
account = User.find_by(id: id).settings(:personal).account
$redis.hset("accounts", id, account)
end
return account
end
end
@prokizzle
prokizzle / Gemfile
Last active August 29, 2015 14:11
Sit or Stand Timer
gem 'timers'
gem 'terminal-notifier'
gem 'daemons'
@prokizzle
prokizzle / authenticated_scraper.rb
Created October 24, 2014 16:09
Serialize authenticated Mechanize sessions in Ruby
class AuthenticatedScraper
def initialize(args)
if args[:session]
@cookie_jar = args[:session]
@agent = Mechanize.new
@agent.cookie_jar = load_session(@cookie_jar)
else
@agent = Mechanize.new
@agent.login(args[:username], args[ password])
end
@prokizzle
prokizzle / crawlable.rb
Last active August 29, 2015 14:02
80legs URL Crawlability Validator
# 80legs Bulk Robots Checker
# 80legs.com 2014
# Usage: ruby crawlable.rb <path_to_url_list>
# Example: $> ruby crawlable.rb /Users/nick/Documents/url_list_1.txt > output.csv
# #=> creates a CSV file containing each url, and whether or not it's crawlable
#
# Installation/Requirements:
# gem install robotstxt
#
class String
@prokizzle
prokizzle / robots.rb
Last active August 29, 2015 14:02
80legs_Robots_Parser
# 80legs Bulk Robots Checker
# 80legs.com 2014
# Usage: ruby robots.rb <path_to_url_list>
# Example: $> ruby robots.rb /Users/nick/Documents/url_list_1.txt
#
# Installation/Requirements:
# gem install rest-client
#
class RobotsParser
require 'json'
@prokizzle
prokizzle / cover.css
Created May 26, 2014 16:39
Pythonista - Quick Driving Duration Calculator
/*
* Globals
*/
/* Links */
a,
a:focus,
a:hover {
color: #fff;
}