I hereby claim:
- I am kitwalker12 on github.
- I am kitwalker (https://keybase.io/kitwalker) on keybase.
- I have a public key whose fingerprint is 82F3 9BCA 0175 E438 C204 B2B1 0ED9 9E9C 1CDA 59BB
To claim this, I am signing this object:
Vagrant.configure("2") do |config| | |
config.vm.box = "coreos" | |
config.vm.box_url = "http://storage.core-os.net/coreos/amd64-generic/dev-channel/coreos_production_vagrant.box" | |
config.vm.network "private_network", | |
ip: "172.12.8.150" | |
config.vm.synced_folder "/Users/myusername/apps", "/home/core/apps", | |
id: "core", | |
:nfs => true, | |
:mount_options => ['nolock,vers=3,udp'] | |
if Vagrant.has_plugin?("vagrant-vbguest") then |
#Install Brew Cask | |
brew tap caskroom/cask | |
brew install brew-cask | |
#Optional if you don't have virtualbox installed | |
brew cask install virtualbox | |
#install vagrant & vagrant-manager(manage vagrantboxes from Menu bar) | |
brew cask install vagrant |
require 'rack' | |
session = 'BAhJIgGHeyJlbWFpbCI6Im1pa2V2Y2hpekBnbWFpbC5jb20iLCJvcmRlcl9udW1iZXIiOiJSNzA3ODIzMzcyIiwiYWRkcmVzc19pZCI6NDkzNCwicGF5bWVudF9wcm9maWxlIjoiMjAzODIzNjEzIiwib3JkZXJfbnVtYmVyIjoiUjcwNzgyMzM3MiJ9BjoGRVQ=--ce30ac2176ce2206a4ad2ba30b31b377d2f19c2a' | |
Rack::Session::Cookie::Base64::Marshal.new.decode(session) |
brew update | |
brew tap phinze/homebrew-cask | |
brew install brew-cask | |
brew cask install virtualbox | |
brew install docker | |
brew install boot2docker | |
#In case the load file is copied incorrectly | |
cp /usr/local/Cellar/boot2docker/1.6.2/homebrew.mxcl.boot2docker.plist ~/Library/LaunchAgents/homebrew.mxcl.boot2docker.plist |
I hereby claim:
To claim this, I am signing this object:
wget -O neo4j-community-2.1.5.tar.gz http://neo4j.com/artifact.php?name=neo4j-community-2.1.5-unix.tar.gz | |
tar -xzvf neo4j-community-2.1.5.tar.gz | |
neo4j-community-2.1.5/bin/neo4j start |
class AlgoliaApi | |
include HTTParty | |
def initialize(type = 'analytics') | |
self.class.base_uri self.class.send("#{type}_base") | |
@auth = { | |
'X-Algolia-API-KEY' => ENV['ALGOLIASEARCH_API_KEY'], | |
'X-Algolia-Application-Id' => ENV['ALGOLIASEARCH_APPLICATION_ID'] | |
} | |
end |
# +---------------------------------------------------------------------------------------------+ | |
# | Converted to ruby from "name that color" javascript - http://chir.ag/tech/download/ntc | | |
# | Usage: | | |
# | mapper = Colormap.new | | |
# | mapper.name_for_hex('#b85085') | | |
# | => ["#B54B73", "Royal Heath", "#FF0000", "Red", false] | | |
# +---------------------------------------------------------------------------------------------+ | |
class Colormap | |
attr_accessor :shades, :names |
#Query for getting objects with association count of 0 | |
Spree::Order.joins('LEFT OUTER JOIN spree_line_items ON spree_orders.id = spree_line_items.order_id').group("spree_orders.id").having("count(spree_line_items.id) = ?",0) | |
#Query for getting objects with association count greater than a number | |
ShopkeepOrder.joins('LEFT OUTER JOIN shopkeep_order_rows ON shopkeep_orders.id = shopkeep_order_rows.shopkeep_order_id').group("shopkeep_orders.id").having("count(shopkeep_order_rows.id) > ?",50) | |
#Query for getting objects with non 0 associations | |
Spree::Order.where("state != ? AND (payment_state IS NULL OR payment_state != ?) AND email is NOT NULL AND abandoned_email_sent_at IS NULL AND spree_orders.updated_at < ?", "complete", "paid", (Time.zone.now - 12.hours)).joins(:line_items).distinct | |
#Orders belonging to a certain category falling in a certain week |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
<title>Your Message Subject or Title</title> | |
<style type="text/css"> | |
/* Based on The MailChimp Reset INLINE: Yes. */ | |
/* Client-specific Styles */ | |
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */ |