Skip to content

Instantly share code, notes, and snippets.

View technoweenie's full-sized avatar
👾
beep boop

technoweenie

👾
beep boop
View GitHub Profile
# lets say we change /repos/* to /repositories
# hardcoded urls
pull_response = RestCall.get("/repos/bob/rails8/pulls") # 301
pull_response = RestCall.get("/repositories/bob/rails8/pulls")
issue_response = RestCall.get("/repos/bob/rails8/issues/#{response.first['issue']}") # 301
issue_response = RestCall.get("/repositories/bob/rails8/issues/#{response.first['issue']}")
# hypermedia
pull_response = RestCall.get("/repos/bob/rails8/pulls") # 301
@technoweenie
technoweenie / pom.xml
Created March 15, 2012 04:58 — forked from codahale/pom.xml
the finished pom.xml after going through the DropWizard tutorial
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.helloworld</groupId>
<artifactId>hello-world</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
@technoweenie
technoweenie / Gemfile
Created November 14, 2011 05:46 — forked from rwjblue/Gemfile
Simple CQL to Thrift Comparison in ruby
source :rubygems
gem 'rake'
gem 'forgery'
gem 'cassandra-cql', :path => '../cassandra-cql'
gem 'cassandra', :path => '../cassandra'
gem 'perftools.rb'
gem 'rbtrace'
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
jquery.hover (arg) ->
value
, (arg) ->
value
# Or:
jquery.hover(
(arg) -> value
# If cached file exists, serve it and stop processing
RewriteCond %{DOCUMENT_ROOT}/cache/%{HTTP_HOST}%{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ /cache/%{HTTP_HOST}$1 [L]
# other redirection (imgs, js, css, ...)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !.*/mephisto/.*
RewriteCond %{REQUEST_URI} !.*html
RewriteCond %{REQUEST_URI} !^/cache
RewriteCond %{DOCUMENT_ROOT}/cache/%{HTTP_HOST}/$1 -f
@technoweenie
technoweenie / gist:9345
Created September 8, 2008 00:15 — forked from kneath/gist:9337
// Beginning of a Ubiquty script for use with xtt
CmdUtils.CreateCommand({
name: "xtt",
takes: {status: noun_arb_text},
preview: function(previewBlock, statusText) {
var previewTemplate = "Updates your XTT status to: <br/>" +
"<b>${status}</b><br /><br />";
var previewData = {