Skip to content

Instantly share code, notes, and snippets.

View alexg0's full-sized avatar

Alexander Goldstein alexg0

  • Eligo Energy, LLC
  • Miami, FL
View GitHub Profile
@douglasjarquin
douglasjarquin / amazon-linux.erb
Last active February 29, 2016 01:42 — forked from darrinholst/amazon-linux.erb
Chef bootstrap template for Amazon Linux
bash -c '
#
# make sure sudo users have the full path...
#
# sudo visudo
# Defaults env_keep += "PATH"
# Defaults !secure_path
#
@redinger
redinger / Emacs.md
Created November 26, 2011 03:22
Setting up Emacs daemon on OS X

Setting up Emacs daemon on OS X

Tired of waiting for emacs to start on OS X? This step by step guide will teach you how to install the latest version of emacs and configure it to start in the background (daemon mode) and use emacsclient as your main editor.

Install Cocoa Emacs

Download the latest pretest version of [Emacs for Mac OS X]: http://emacsformacosx.com/builds

class Module
# just like include except it makes sure to find all
# the modules that have already included self and
# update those features with the given module.
def include_hard(include_me)
include include_me
ObjectSpace.each_object(Module) do |some_module|
next unless some_module.included_modules.include?(self)
next if some_module.included_modules.include?(include_me)
some_module.class_eval { include include_me }
@calvincorreli
calvincorreli / exceptional_for_delayed_job.rb
Created November 24, 2010 11:02
Integrating Exceptional with https://github.com/collectiveidea/delayed_job - put this in config/initializers/
if !Exceptional::Config.api_key.nil? && Rails.env == 'production'
begin
class Delayed::Worker
def handle_failed_job_with_exceptional(job, error)
Exceptional.handle(error, "Delayed::Job #{self.name}")
handle_failed_job_without_exceptional(job, error)
Exceptional.context.clear!
end
alias_method_chain :handle_failed_job, :exceptional
Exceptional.logger.info "Lars Pind's custom DJ integration enabled"
$(document).ready(function() {
// Define the dateFormat for the datepicker
$.datepicker._defaults.dateFormat = 'dd M yy';
/**
* Sets the date for each select with the date selected with datepicker
*/
$('input.ui-date-text').live("change", function() {
var sels = $(this).siblings("select:lt(3)");
var d = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $(this).val() );
@troy
troy / save-redfin-listing-images-bashrc
Created September 10, 2009 13:22
Given a redfin.com house listing URL, save all full-size images
# usage: redfin-images "http://www.redfin.com/WA/Seattle/123-Home-Row-12345/home/1234567"
function redfin-images() {
wget -O - $1 | grep "full:" | awk -F \" '{print $4}' | xargs wget -
}