Skip to content

Instantly share code, notes, and snippets.

View skotzko's full-sized avatar

Andrew Skotzko skotzko

View GitHub Profile
@bblanchon
bblanchon / settings.json
Created February 9, 2016 10:28
Sublime Text: Restore Quick Switch Project shortcut
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" }
@Aaronontheweb
Aaronontheweb / FriendsMaster.cs
Created June 1, 2015 18:42
Akka.NET Parent Actor "Create If Not Exist" pattern
/*
* From Petabridge's Akka.Remote training: https://petabridge.com/training/akka-remoting/
* Copyright Petabridge LLC, 2015.
*/
/// <summary>
/// Master actor responsible for the management of friends lists
/// </summary>
public class FriendsMaster : ReceiveActor
{
@jaimeiniesta
jaimeiniesta / setup_sumo_me.js.coffee
Created December 21, 2014 15:48
How to load SumoMe script in a turbolinks-friendly way
# Defines a namespace for my application
MyApplication = {}
# A way to pass a callback both to jQuery's "ready" and turbolinks' "page:load" events
MyApplication.onDocumentReady = (callback) ->
$(document).ready(callback)
$(document).on('page:load', callback)
# Defines a function to load the SumoMe script
MyApplication.load_sumome_script = (data_sumo_site_id) ->
@beccam
beccam / GettingStartedThree.py
Last active February 4, 2016 18:34
Getting Started with Apache Cassandra Part III (cqlengine)
from cqlengine import columns
from cqlengine.models import Model
class Users(Model):
firstname = columns.Text()
age = columns.Integer()
city = columns.Text()
email = columns.Text()
lastname = columns.Text(primary_key=True)
def __repr__(self):
from cassandra.cluster import Cluster
from cassandra.policies import (TokenAwarePolicy, DCAwareRoundRobinPolicy, RetryPolicy)
from cassandra.query import (PreparedStatement, BoundStatement)
cluster = Cluster(
contact_points=['127.0.0.1'],
load_balancing_policy= TokenAwarePolicy(DCAwareRoundRobinPolicy(local_dc='datacenter1')),
default_retry_policy = RetryPolicy()
)
session = cluster.connect('demo')
@hkhamm
hkhamm / installing_cassandra.md
Last active June 27, 2024 21:46
Installing Cassandra on Mac OS X

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@shageman
shageman / resources
Created April 23, 2014 20:34
#cbra resources from @shageman #railsconf talk
#Rails sample app
github.com/shageman/the_next_big_thing
# Pivotal Labs blog posts on #cbra
http://pivotallabs.com/tag/rails-application-suites/
#Past presentations by Ben Smith and me(mostly on this topic)
confreaks.com/presenters/790-stephan-hagemann
confreaks.com/presenters/784-ben-smith
@vincentmac
vincentmac / sublime-text-osx-context-menu.md
Created September 25, 2013 18:03
Sublime Text OSX Context Menu

Add Sublime Text to OS X Context Menu

  • Open Automator
  • Create a new Service
  • Add a Run Shell Script action
  • Set input to Service receives selected files or folders in any application
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n $@
  • Set Pass input to as arguments
  • Save as Open in Sublime Text
@maxim
maxim / rails_load_path_tips.md
Last active August 15, 2024 15:17
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/