Skip to content

Instantly share code, notes, and snippets.

View L2G's full-sized avatar

Larry Gilbert L2G

View GitHub Profile
@L2G
L2G / libltdl.a
Created July 17, 2015 01:01
Mysterious /usr/lib/libltdl.a on my Mavericks system
# libltdl.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.5 (1.1220 2003/04/05 19:32:58)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='libltdl.3.dylib'
# Names of this library.

Keybase proof

I hereby claim:

  • I am L2G on github.
  • I am l2g (https://keybase.io/l2g) on keybase.
  • I have a public key whose fingerprint is 4B19 A4C0 2660 D5A5 872F 7778 E598 7E6D 71F4 BECF

To claim this, I am signing this object:

@L2G
L2G / 01.configure
Last active August 29, 2015 14:20
Build problems upgrading libexosip in Homebrew
2015-05-04 09:43:44 -0700
./configure
--disable-debug
--disable-dependency-tracking
--prefix=/usr/local/Cellar/libexosip/4.1.0
configure: eXosip2 The Extended Open SIP library.
configure: Copyright (C) 2002-2012 Aymeric MOIZARD - <[email protected]>
Configuring libeXosip2 4.1.0
@L2G
L2G / xonsh.rb
Last active August 29, 2015 14:20
yuppie is working on a xonsh formula for Homebrew
class Xonsh < Formula
homepage "http://xonsh.org"
url "https://github.com/scopatz/xonsh/archive/0.1.0.tar.gz"
sha256 "c77dc7176bd9035e90a448d5a208d4d176535545335678443769602f59f170b6"
depends_on :python3
resource "ply" do
url "https://pypi.python.org/packages/source/p/ply/ply-3.6.tar.gz"
sha256 "61367b9eb2f4b819f69ea116750305270f1df8859992c9e356d6a851f25a4b47"
@L2G
L2G / git_tree_timestamp_filter.rb
Last active August 29, 2015 14:20
Proof of concept: filter a Git tree so that all files have timestamps matching the last commit to touch them
#!/usr/bin/env ruby
OUTPUT = ARGV[0]
# Convert Git timestamp into Ruby time
timestamp = Time.at(ENV['GIT_AUTHOR_DATE'].delete('@').to_i)
# Collect all real files added or modified in the commit
files = []
%x(git show --raw #{ENV['GIT_COMMIT']}).split("\n").each do |line|
@L2G
L2G / age.bash
Last active August 29, 2015 14:20
Age Homebrew formulae
for file in *; do
for commit in $(awk '{print $1}' ../../relevant.commits); do
age="$(git log --pretty="%at,%ar" -n1 -- $file)"
if [ "" != "$age" ]; then echo "$file,$age"; break; fi
done
done
@L2G
L2G / check-stgit.sh
Last active October 20, 2015 16:17
Git hooks I use to avoid shooting myself in the foot with Stacked Git (StGit)
#!/bin/bash
# Look for an executable named "stg" and assume that it's StGit
STGIT=$(which stg)
if [[ ! -z $STGIT ]]; then
if [[ -x $STGIT ]]; then
if ($STGIT top >&/dev/null); then
echo "*"
echo "* Whoa there!! You have at least one StGit patch applied:"
@L2G
L2G / rake.out.txt
Created September 25, 2013 21:28
Output of 'rake vagrant:up' after cloning https://github.com/basho/puppet-riak
Bringing machine 'riak-1.local' up with 'virtualbox' provider...
[riak-1.local] Importing base box 'CentOS-6.3_x86_64-small'...
[...progress meter ticks away here...]
[riak-1.local] Matching MAC address for NAT networking...
[riak-1.local] Setting the name of the VM...
[riak-1.local] Clearing any previously set forwarded ports...
[riak-1.local] Creating shared folders metadata...
[riak-1.local] Clearing any previously set network interfaces...
[riak-1.local] Preparing network interfaces based on configuration...
[riak-1.local] Forwarding ports...
@L2G
L2G / test.txt.mountain_berry_fields
Created August 31, 2013 23:12
A simple test of mountain_berry_fields (https://github.com/JoshCheek/mountain_berry_fields). I'm working on the RestClient gem and trying to use mbf to verify some code examples. I'm hitting a roadblock with this one, though: when I try to run it through mbf, I get the cryptic error message "NoMethodError undefined method `write' for File:Class"…
<% setup do %>
require './lib/restclient'
<% end %>
This is a test:
<% test 'generic test', with: :magic_comments do %>
response = RestClient.get 'http://l2g.github.com/'
response.code # => 200
<% end %>
@L2G
L2G / .gitconfig
Created September 29, 2012 04:58
A little sugar I add to my user .gitconfig
[url "[email protected]:L2G/"]
insteadOf = "github:///L2G/"
insteadOf = "http://github.com/L2G/"
insteadOf = "https://github.com/L2G/"
[url "https://github.com/"]
insteadOf = "github:///"
insteadOf = "http://github.com/"