Skip to content

Instantly share code, notes, and snippets.

View jeremywrowe's full-sized avatar
❤️
Coding

Jeremy W. Rowe jeremywrowe

❤️
Coding
View GitHub Profile
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@moklett
moklett / margarita.md
Last active August 31, 2020 14:13
The Perfect Margarita

The Perfect Margarita

This is my "go to" margarita because of the ease of preparation and the simplicity of ingredients.

TL;DR

1oz orange liqueur, 2oz tequila, 3oz limeade, 1/2 lime, shaken with ice.

@chantastic
chantastic / .projections.json
Last active February 13, 2024 19:42
ember-cli VIM projections
{
"app/adapters/*.js": {
"command": "adapter",
"template": [
"// export default DS.{capitalize}Adapter.extend();",
]
},
"app/components/*.js": {
"command": "component",
@jeremywrowe
jeremywrowe / status_code.php
Last active December 20, 2015 15:19
This is an example of querying the chargify api and retrieving the status code of the response
<?php
$api_key = "";
$subdomain = "";
$handle = curl_init('https://'.$subdomain.'.chargify.com/customers/100000.json');
curl_setopt($handle, CURLOPT_USERPWD, $api_key . ":x");
curl_setopt($handle, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($handle);
@jeremywrowe
jeremywrowe / gist:5373873
Last active December 16, 2015 03:59
Do you want to get onto your recent branchies easy? Here - ya - go. Create a new file named whatever you want, make it executable and put it in your path. From there go to your favorite project that you are working on type in whatever you named the script, and you are off to the races.
#!/usr/bin/env ruby
trap("INT") { puts "\ncatch'ya later"; exit 0 }
output = `git for-each-ref --count=10 --sort=-committerdate refs/heads/ --format='%(refname:short)'`
branches = output.split("\n")
unless option = ARGV[0]
puts <<-MSG
@jeremywrowe
jeremywrowe / too_legit.c
Last active August 11, 2016 17:52
Bringing goto statements in c back into style.
#include <stdlib.h>
#include <stdio.h>
#define too goto
int main( int argc, const char* argv[]) {
int times;
times = 0;
legit:
printf(" too legit,");
@jeremywrowe
jeremywrowe / cucumber_leaks.rb
Last active December 15, 2015 20:41
Show leaked instance variables in cucumber. A terrible hack but sometimes that is what ya need to do :)
$cucumber_instance_variables = []
Before do
$cucumber_instance_variables = instance_variables
end
After do
test_variables = instance_variables - $cucumber_instance_variables
message = "[WARN] the following test variables could be leaking #{leaked_variables.join(', ')}"
@jeremywrowe
jeremywrowe / routs_rails_console.rb
Created April 5, 2013 14:37
routes in rails console
include ActionDispatch::Routing
include Rails.application.routes.url_helpers
@tomdale
tomdale / gist:3981133
Last active November 26, 2019 21:19
Ember.js Router API v2

WARNING

This gist is outdated! For the most up-to-date information, please see http://emberjs.com/guides/routing/!

It All Starts With Templates

An Ember application starts with its main template. Put your header, footer, and any other decorative content in application.handlebars.

<header>