Skip to content

Instantly share code, notes, and snippets.

Les Fletcher hmcfletch

Block or report user

Report or block hmcfletch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
janlelis / .railsrc
Created Mar 31, 2011
13 Rails-specific hints for your rails 3 console.
View .railsrc
# .railsrc for Rails 3, encoding: utf-8
# see
if !Rails.application then warn "Rails isn't loaded, yet... skipping .railsrc" else
# # #
def ripl?; defined?(Ripl) && Ripl.instance_variable_get(:@shell); end
# # #
# loggers
dhoerl / KeychainItemWrapper.h
Last active Aug 14, 2019
KeychainItemWrapper ARCified. Added the ability to manage a dictionary in place of just a string - the #define PASSWORD_USES_DATA in the .m file switches the mode.
View KeychainItemWrapper.h
File: KeychainItemWrapper.h
Objective-C wrapper for accessing a single keychain item.
Version: 1.2 - ARCified
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
lucasfais / gist:1207002
Created Sep 9, 2011
Sublime Text 2 - Useful Shortcuts
View gist:1207002

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
sinisterchipmunk / LICENSE
Last active Sep 20, 2019
tar, gzip, and untar files using ruby in memory without tempfiles
Copyright (C) 2011 by Colin MacKenzie IV
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
jcromartie / spark.rb
Created Nov 15, 2011
Sparklines in Ruby
View spark.rb
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# prints a sparkline in the terminal using the supplied list of numbers
# examples:
# spark.rb 10 20 30 100 90 80
# spark.rb 1 2 0.4 0.1 1.3 0.7
@ticks = %w[▁ ▂ ▃ ▄ ▅ ▆ ▇]
values = { |x| x.to_f }


cribbed from

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.


# Namespace for classes and modules that handle serving documentation over HTTP
axelav / gist:1839777
Created Feb 15, 2012 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View gist:1839777

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
gudbergur / README.markdown
Created Feb 19, 2012
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things
View README.markdown

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
    # source can be a function
    source: (typeahead, query) ->
      # this function receives the typeahead object and the query string
joshmvandercom / dropdown_to.rb
Created Feb 27, 2012
Passing a block into a helper
View dropdown_to.rb
# Creates a Bootstrap dropdown
# Ex:
# = dropdown_to "Auctions", auctions_path do
# %li= link_to 'Upcoming Auctions', auctions_path
# %li= link_to 'Past Auctions', past_auctions_path
# Returns:
# <li class="dropdown">
# <a class="dropdown-toggle" data-toggle="dropdown" href="/auctions">
# <span>Auction</span>
nicerobot /
Last active Nov 14, 2019
Mac OS X uninstall script for packaged install of node.js from

To run this, you can try:

curl -ksO
chmod +x ./
You can’t perform that action at this time.