Skip to content

Instantly share code, notes, and snippets.

View jjasonclark's full-sized avatar
🏠
Working from home

Jason Clark jjasonclark

🏠
Working from home
View GitHub Profile
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active March 3, 2026 06:20
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@keccers
keccers / fizzbuzz.rb
Created August 1, 2013 03:35
OO Ruby FizzBuzz
class FizzBuzz
attr_reader :limit, :sequence
def initialize(limit)
@limit = limit
@sequence = []
end
def display
@jstorimer
jstorimer / tclient.rb
Created June 25, 2013 21:09
These scripts were the result of the "Faster Rails test runs...with Unix!" screencast at https://www.youtube.com/watch?v=RSehcT4MnRM.
#!/usr/bin/env ruby
require 'socket'
test_file = ARGV[0]
socket = UNIXSocket.new('testing.sock')
socket.write(test_file)
socket.close_write
@jpr5
jpr5 / bot.rb
Created April 26, 2011 07:13
XMPP/Ruby Bot for HipChat
#!/usr/bin/env ruby
#
# Script: HipChat bot in Ruby
# Author: Jordan Ritter <jpr5@darkridge.com>
#
unless `rvm-prompt i g`.chomp == "ree@xmpp"
exec("rvm ree@xmpp ruby #{$0}")
end
@jsocol
jsocol / sockolepsy.js
Created March 16, 2011 01:20
slow TCP proxy
/**
* Usage: node sockolepsy.js <listen> <forward> <delay>
*
* Creates a generic TCP proxy that can introduce a controllable degree of
* delay per packet.
*
* Params:
* listen - the port to listen on.
* forward - the port to foward to.
* delay - the amount of delay to introduce, in ms.