Skip to content

Instantly share code, notes, and snippets.

View dfischer's full-sized avatar

0x44 0x46 dfischer

View GitHub Profile
@xn
xn / gist:1077093
Created July 12, 2011 00:12
patched ruby
curl https://raw.github.com/gist/1008945/7532898172cd9f03b4c0d0db145bc2440dcbb2f6/load.patch > /tmp/load.patch
rvm get head # always good to make sure you're up to date with RVM
rvm reload
rvm install ruby-1.9.2-p180 --patch /tmp/load.patch -n patched
rvm use ruby-1.9.2-p180-patched
if (Meteor.is_client) {
var userName = "PatelNachiket";
Template.hello.greeting = function () {
return "Fetch recent tweets from Twitter stream of user : " ;
};
Template.hello.events = {
'click #fetchButton' : function () {
console.log("Recent tweets from stream!");
$('#fetchButton').attr('disabled','true').val('loading...');
@zyphlar
zyphlar / googlevisualr-helper.rb
Created July 11, 2012 23:14
Helper and model methods for creating GoogleVisualr charts
# This is a Rails helper for generating a single chart for a column from a data set.
# blood_tests is the data set, and column_name is the column from the set to use.
# It calls generate_chart_row for each record, passing the column_name argument.
# It also does some stuff with vertical axis labels and chart options.
def generateChart(blood_tests, column_name)
data_table = GoogleVisualr::DataTable.new
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@joshnuss
joshnuss / mnesia.exs
Last active March 9, 2024 00:32
Elixir example code for accessing mnesia databases
# define a record, first attribute is considered the key
defrecord User, email: "", first: "", last: ""
# encapsulates mnesia calls
defmodule Database do
def create_schema do
create_table User
end
def find(record, id) do
# A little Meteor CheatSheet about Iron-Router. (updated on a weekly basis)
# Check our Studio: https://gentlenode.com/
meteor add iron:router
meteor update iron:router
# Iron Router > Configuration
# A little Meteor CheatSheet about Iron-Router. (updated on a weekly basis)
# Check our Studio: https://gentlenode.com/
# Iron Router > Configuration
Router.configure
layoutTemplate: 'Main'
loadingTemplate: 'Loading'
@mokemokechicken
mokemokechicken / rcov_slack.sh
Last active August 31, 2016 01:42
SlackBot for rcov coverage report
COVERAGE_DIR=${COVERAGE_DIR:-coverage}
REPORT_NAME=${REPORT_NAME:-index.html}
author=$(git log --format='%an <%ae>' -1 $id_new | sed 's/\\/\\\\/g;s/\"/\\"/g')
message=$(git log --format=%s -1 $id_new | sed 's/\\/\\\\/g;s/\"/\\"/g')
latest="${COVERAGE_DIR}/${REPORT_NAME}"
[ -e "$COVERAGE_DIR" ] || mkdir "$COVERAGE_DIR"
cp "$1" "$latest"
@kachayev
kachayev / concurrency-in-go.md
Last active March 11, 2024 11:27
Channels Are Not Enough or Why Pipelining Is Not That Easy