Skip to content

Instantly share code, notes, and snippets.

View L2G's full-sized avatar

Larry Gilbert L2G

View GitHub Profile
@brandt
brandt / com.runlevel1.homebrew.update.plist
Created January 10, 2014 16:24
Homebrew automatic formula updater daemon. Install to: ~/Library/LaunchAgents/com.runlevel1.homebrew.update.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.runlevel1.homebrew.update</string>
<key>EnvironmentVariables</key>
<dict>
<key>TERM</key>
<string>ansi</string>
@aras-p
aras-p / preprocessor_fun.h
Last active November 15, 2024 09:22
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@amolpujari
amolpujari / default.rb
Last active December 16, 2015 22:29
chef-solo rails deploy git submodule checkout branch sha
# solo.rb
require File.expand_path('../lib/global_constants.rb', __FILE__)
require File.expand_path('../lib/git_addition.rb', __FILE__)
root = File.absolute_path(File.dirname(__FILE__))
file_cache_path root
cookbook_path [ root + '/cookbooks', root + '/custom_cookbooks']
data_bag_path root + '/data_bags'
node_path root + '/nodes'
@fnichol
fnichol / README.md
Created March 12, 2011 20:52
Download a cacert.pem for RailsInstaller

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)