Skip to content

Instantly share code, notes, and snippets.

View danhorst's full-sized avatar
🛳️
SHIP IT

Dan Brubaker Horst danhorst

🛳️
SHIP IT
View GitHub Profile
@jpinnix
jpinnix / gist:547977
Created August 24, 2010 17:55
Help nginx+passenger serve static index pages
# Help nginx+passenger serve static index pages
# Site specific config
server {
listen 80;
server_name domain.com;
index index.html;
access_log logs/appname.access.log;
error_log logs/appname.error.log;
@mudge
mudge / gist:786953
Last active November 3, 2021 08:59
How to pass blocks between methods in Ruby < 3.0.0 without using &block arguments.
# UPDATE: The ability to call Proc.new without a block was removed in Ruby 3.0.0
# See https://bugs.ruby-lang.org/issues/10499 for more information.
# So you might have heard that this is slow:
#
# def some_method(&block)
# block.call
# end
#
# Compared to:
@imathis
imathis / Pullquote.css
Created June 19, 2011 02:52
Jekyll Pullquote plugin for Octopress
.has-pullquote:before {
/* Reset metrics. */
padding: 0;
border: none;
/* Content */
content: attr(data-pullquote);
/* Pull out to the right, modular scale based margins. */
float: right;
@indirect
indirect / DefaultKeyBinding.dict
Last active February 7, 2020 04:55
Type many useful symbols like ↑, ⌘, and ★
/* Put this in ~/Library/KeyBindings/DefaultKeyBinding.dict */
/* Based on a file from @eventualbuddha */
{
/* Modifier keys: start with C-m */
"^m" = {
"^ " = ("insertText:", "\U2423"); /* C-space space */
"^e" = ("insertText:", "\U21A9"); /* C-e return */
"e" = ("insertText:", "\U2305"); /* e enter */
@codeforkjeff
codeforkjeff / solarize.sh
Created November 27, 2011 06:43
shell script for setting gnome-terminal color palette to use Solarized theme
#!/bin/sh
#
# Shell script that configures gnome-terminal to use solarized theme
# colors. Written for Ubuntu 11.10, untested on anything else.
#
# Solarized theme: http://ethanschoonover.com/solarized
#
# Adapted from these sources:
# https://gist.github.com/1280177
# http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/
@tmtk75
tmtk75 / markdown-tag.rb
Created November 30, 2011 08:10
Jekyll Markdown Tag
=begin
Jekyll tag to include Markdown text from _includes directory preprocessing with Liquid.
Usage:
{% markdown <filename> %}
Dependency:
- kramdown
=end
module Jekyll
class MarkdownTag < Liquid::Tag
def initialize(tag_name, text, tokens)
@scottkellum
scottkellum / normalized.html
Created December 6, 2011 14:58
pixel normalization
<!doctype html>
<html>
<head>
<!-- Encoding -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></meta>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }
@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#