Skip to content

Instantly share code, notes, and snippets.

View raws's full-sized avatar
🥯
dabbling in pumpernickel

Ross Paffett raws

🥯
dabbling in pumpernickel
View GitHub Profile
@raws
raws / gist:1861817
Created February 19, 2012 03:32
Spoutcraft development Rake tasks
# Spoutcraft development Rake tasks
# Usage: rake -T
#
# These tasks assume the following folder structure:
# spoutcraft/
# lib/
# spoutcraft-api.jar A compatible SpoutcraftAPI package
# mcp/ Minecraft Coder Pack
# conf/ Symlink to ../conf
# lib/ Symlink to ../lib
scope :module => "Api::V2" do
scope :path => "api/v2" do
resources :users
end
end
scope :module => "Api::V1" do
scope :path => "api/v1" do
resources :users
end
@sj26
sj26 / 0-readme.md
Created May 5, 2012 05:39 — forked from burke/0-readme.md
ruby-1.9.3-p194 cumulative performance patch.

Patched ruby 1.9.3-p194 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p194 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Huge thanks to funny-falcon for the performance patches.

@raws
raws / create-git-repo.sh
Created July 15, 2012 06:17
Bash helper script for creating a Git repository on systems hosting them
#!/bin/bash
#
# create-git-repo
#
# Create and publish a Git repository so that it is able to be
# cloned via `git clone git@host:repo.git'.
#
# Author: Ross Paffett <ross@rosspaffett.com>
GIT_DATA="/var/git" # Where to store the actual git repositories
@raws
raws / downcase.sh
Created July 15, 2012 17:12
Bash helper script for recursively lowercasing file names
#!/bin/bash
#
# downcase PATH
#
# Recursively convert all file names contained in the given directory
# tree (but excluding the given directory itself) to lowercase.
# Existing files which are named identical to new, lowercased file
# names will be clobbered.
#
# Author: Ross Paffett <ross@rosspaffett.com>
@steveklabnik
steveklabnik / Gemfile
Created July 24, 2012 21:52
Hypermedia Proxy pattern in JSON
source :rubygems
gem 'sinatra'
@raws
raws / curl.md
Created December 9, 2012 15:38 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@raws
raws / bijective.rb
Created December 25, 2012 00:58 — forked from zumbojo/bijective.rb
# Simple bijective function
# Basically encodes any integer into a base(n) string,
# where n is ALPHABET.length.
# Based on pseudocode from http://stackoverflow.com/questions/742013/how-to-code-a-url-shortener/742047#742047
ALPHABET =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split(//)
# make your own alphabet using:
# (('a'..'z').to_a + ('A'..'Z').to_a + (0..9).to_a).shuffle.join
@raws
raws / slugs.rb
Created December 25, 2012 01:53 — forked from bkerley/slugs.rb
> ruby slugs.rb
id: 1639513188
enciphered output, string-escaped for your convenience:
"X\xD0\x97N"
slug: lt1krc
decrypted id: 1639513188
the same?
true
@spikegrobstein
spikegrobstein / nginx.conf
Last active September 22, 2023 04:19
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.