Skip to content

Instantly share code, notes, and snippets.

Verifying I am +jkronz on my passcard. https://onename.com/jkronz
@jkronz
jkronz / feed.rb
Last active August 29, 2015 14:20
Refactoring AR Model to be an Entity and an Adapter by Peter Harkins @pushcx
class Feed
attr_reader :user
include Adamantium
def initialize user
@user = user
end
def microposts
# extracting side effects from Micropost is an obvious next step
{
init: function(elevators, floors) {
var floorRequests = {
up: [],
down: []
};
elevators.map(function(elevator, i){
var destinations = [];
function nextDestination() {
card[number]:4111111111111111
card[cvc]:123
card[exp_month]:9
card[exp_year]:2015
key:pk_test_8zEmylR7G0Y04mcdts7hAEZR
payment_user_agent:stripe.js/15d3aa9
callback:sjsonp1420920916988
_method:POST
@jkronz
jkronz / cat_fact.rb
Last active November 3, 2015 17:33
Cat Facts Slack Integration
class CatFact
def self.fact
response = Typhoeus.get("http://catfacts-api.appspot.com/api/facts")
JSON.parse(response.body)['facts'].first
end
end
@jkronz
jkronz / autotunes
Last active December 14, 2015 01:19
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
server {
listen 8080;
root /Users/justin/Projects/lucena/QuantDesk/public;
index index.html;
#rewrite ^(.+)$ /index.html;
#location ~ ^/(.+)/$ {
#rewrite .* /index.html last;
#}
[scribe] 16483 round 1
[scribe] 16688 round 1
[scribe] 21279 round 1
@jkronz
jkronz / rbenvpath.txt
Created August 3, 2012 15:10
rbenv setup
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
#!/usr/bin/env zsh
#
# The argument is the tag to move to HEAD
git tag -d $1
git push origin :$1
git tag $1
git push origin $1