Skip to content

Instantly share code, notes, and snippets.

View teoljungberg's full-sized avatar

Teo Ljungberg teoljungberg

View GitHub Profile
@sjl
sjl / ffind.md
Created September 19, 2012 21:52
friendly-find

friendly-find

Brainstorming a friendlier find(1).

Usage

Goals:

@himynameisjonas
himynameisjonas / 0-readme.md
Last active October 13, 2015 05:48 — forked from burke/0-readme.md
ruby-1.9.3-p385 cumulative performance patch for rbenv

ruby-1.9.3-p385 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p385 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@niklasl
niklasl / pres.mkd
Created January 10, 2013 21:41
Scripting Vim - From Moves to Tools [A Vim Presentation]

Scripting Vim - From Moves to Tools

  • Customizing Vim
  • Mappings
  • Commands
  • Batching with Vim
  • Case: plugin

@knubie
knubie / .tmux.conf
Last active September 13, 2017 10:12
Experimental zsh/tmux set up. Display CWD/vim file and git repo information in the tmux status bar.
# Update the status bar by fetching an environment variable set earlier by a shell script.
# Requires Thomas Adam's hook patch for tmux
# https://github.com/ThomasAdam/tmux/tree/ta/hooks
set-hook -g -n 'after-select-window' 'run "tmux set -q status-left \"`tmux show -environment TMUX_STATUS_#I | cut -c 15-`\""'
set-hook -g -n 'after-kill-window' 'run "tmux set -q status-left \"`tmux show -environment TMUX_STATUS_#I | cut -c 15-`\""'
@defunkt
defunkt / mini.rb
Created February 18, 2010 13:29
test/spec/mini 5 - nested contexts, stacked setups
##
# test/spec/mini 5
# http://gist.github.com/307649
# chris@ozmm.org
#
def context(*args, &block)
return super unless (name = args.first) && block
require 'test/unit'
klass = Class.new(defined?(ActiveSupport::TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase) do
def self.test(name, &block)
@isaacsanders
isaacsanders / agenda.md
Created January 2, 2013 02:43
An agenda for a recent meeting.

#Council of Chiefs

9:00PM November 3, 2012

Camp Lazarus
4422 Columbus Pike
Delaware, OH 43015

Goal of the Meeting: To make decisions regarding the specifics of Conclave 2013

@hopsoft
hopsoft / readme2ghpage.rb
Created June 21, 2012 17:09
Convert your README.md on master to index.md on gh-pages
#!/usr/bin/env ruby
# checkout the readme from the master branch
`git checkout gh-pages; git checkout master README.md`
path = `pwd`.gsub(/\n/, "")
readme_path = File.join(path, "README.md")
index_path = File.join(path, "index.md")
# write the index readme file
@sirupsen
sirupsen / vim7.3_mac_install.rb
Created July 27, 2011 21:57 — forked from pengwynn/vim7.3_mac_install.rb
Script to install Vim 7.3 with ruby support for Mac OS X Lion
# requires root permissions in /usr/bin/
star = String.new
8.times { star += "*" }
Star = "\n#{star * 3}\n"
def newblock string
puts "\n#{Star}#{string}#{Star}\n"
end
# Updated version is always at: https://gist.github.com/febuiles/1549991
#!/bin/bash
artist=`osascript -e'tell application "iTunes"' -e'get artist of current track' -e'end tell'`
title=`osascript -e'tell application "iTunes"' -e'get name of current track' -e'end tell'`
song=`curl -s --get "https://makeitpersonal.co/lyrics" --data-urlencode "artist=$artist" --data-urlencode "title=$title"`
echo -e "$artist - $title\n$song"
@JoshCheek
JoshCheek / README.md
Last active May 2, 2021 19:44
Challenge to create your own struct

This is a response for one of our apprentices who wanted to learn more about how structs work.

TL;DR

Part of this is a response and part of it a challenge. If you are only interested in the challenge clone the repo and run rake (more detailed instructions here).

Introduction