Skip to content

Instantly share code, notes, and snippets.

View JasonGiedymin's full-sized avatar
Localized in the quantum field of probabilities.

Jason Giedymin JasonGiedymin

Localized in the quantum field of probabilities.
View GitHub Profile
@JasonGiedymin
JasonGiedymin / hello-backbonejs-step5.coffee
Created July 8, 2011 03:10 — forked from mythz/hello-backbonejs-step5.coffee
Hello Backbone.js in CoffeeScript
# Rewrote excellent intro to Backbone.js http://arturadib.com/hello-backbonejs/ in CoffeeScript
$ ->
Backbone.sync = (method, model, success, error) ->
success()
class Item extends Backbone.Model
defaults:
part1: 'hello'
part2: 'world'
@JasonGiedymin
JasonGiedymin / Foo.coffee
Created July 8, 2011 03:10
Extending Backbone.Model in CoffeeScript
Backbone = require 'backbone'
class Foo extends Backbone.Model
set: -> super
foo = new Foo
foo.set x: 'x'
console.log foo.get 'x' # x
@JasonGiedymin
JasonGiedymin / rc.firewall
Created August 29, 2011 14:56
OSX IPFW Firewall Scripts
#!/bin/sh
# Script originally from: https://www.haught.org/article/osx-firewall/
######################
#### Installation ####
######################
# - Copy this file to:
# /usr/local/sbin/rc.firewall # Make sure this file is in the correct location
@JasonGiedymin
JasonGiedymin / jumpstart-ubuntu-rails-and-friends.sh
Created October 31, 2011 13:35
Jump Start with Ubuntu, Rails, and Friends.
#!/bin/bash
# --------------------------------------------------------
#
# Jump Start with Ubuntu, Rails, and Friends.
#
# Notes: Asterisk (*) denotes manual intervention
#
# --------------------------------------------------------
echo "Don't actually run this. Use it as a copy-paste template."
@JasonGiedymin
JasonGiedymin / postgresql.rake
Created November 18, 2011 20:33
Easy PostgreSQL Start/Stop Rake tasks for OSX
#
# Don't want to run PostgreSQL as a service? Want to manually start and stop it?
# >> bundle exec rake postgresql:mac:start
# >> bundle exec rake postgresql:mac:stop
#
namespace :postgresql do
namespace :mac do
desc "Starts a Mac brew installed Postgres DB."
@JasonGiedymin
JasonGiedymin / rabbitmq.rake
Created November 19, 2011 21:34
Easy RabbitMQ Start/Stop Rake tasks for OSX
#
# Don't want to run PostgreSQL as a service? Want to manually start and stop it?
# >> bundle exec rake rabbitmq:mac:start
# >> bundle exec rake rabbitmq:mac:stop
#
namespace :rabbitmq do
namespace :mac do
desc "Starts a Mac brew installed RabbitMQ server."
@JasonGiedymin
JasonGiedymin / parseing_test.py
Created November 25, 2011 22:47
Testing some parsing.
from time import strftime
import math
'''
Parse `input.conf`, store [access_key] in dict with tupple of IPs.
# `input.conf` file
access1, key1, 192.168.0.1; 192.168.0.2; 192.168.0.3
access2, key1, 192.168.0.1; 192.168.0.2; 192.168.0.3
access3, key1, 192.168.0.1; 192.168.0.2; 192.168.0.3
@JasonGiedymin
JasonGiedymin / gist:2401614
Created April 16, 2012 21:24
Find and remove all .svn folders recursively starting from pwd.
# Find and remove all .svn folders recursively starting from pwd.
find ./ -iname ".svn" -print0 | xargs -0 rm -R
@JasonGiedymin
JasonGiedymin / jvm_tuning_64bit
Created April 17, 2012 17:42
JVM Performance Tuning
# Jason Giedymin
# jasong _-@-_ apache _dot_ org
# Try these options for your 64bit JVM.
# Aggressive collection, Large-ish Memory footprint
-Xss1024k -Xms512m -Xmx1408m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=1024m -XX:+AggressiveOpts -XX:ParallelGCThreads=16 -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseCompressedOops
# Aggressive collection but use memory if needed
-Xss1024k -Xms128m -Xmx1408m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=1024m -XX:+AggressiveOpts -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseCompressedOops
@JasonGiedymin
JasonGiedymin / idea64.vmoptions
Created April 17, 2012 17:51
Intellij64BitSpeedUps
-Xss2048k
-Xms768m
-Xmx1408m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=1280m
-XX:+AggressiveOpts
-XX:ParallelGCThreads=16
-XX:+UseConcMarkSweepGC
-XX:+UseParNewGC
-XX:+ExplicitGCInvokesConcurrent