This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Backbone = require 'backbone' | |
| class Foo extends Backbone.Model | |
| set: -> super | |
| foo = new Foo | |
| foo.set x: 'x' | |
| console.log foo.get 'x' # x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # 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." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # 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." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Find and remove all .svn folders recursively starting from pwd. | |
| find ./ -iname ".svn" -print0 | xargs -0 rm -R |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -Xss2048k | |
| -Xms768m | |
| -Xmx1408m | |
| -XX:MaxPermSize=512m | |
| -XX:ReservedCodeCacheSize=1280m | |
| -XX:+AggressiveOpts | |
| -XX:ParallelGCThreads=16 | |
| -XX:+UseConcMarkSweepGC | |
| -XX:+UseParNewGC | |
| -XX:+ExplicitGCInvokesConcurrent |