Skip to content

Instantly share code, notes, and snippets.

View mrchrisadams's full-sized avatar

Chris Adams mrchrisadams

View GitHub Profile

Boxen uses a bunch of shellscripts to insert itself into your environment on shell load.

These assume a POSIX shell, which fish is not.

Run this script to generate a fish-compatible config file in ~/.config/fish/boxen.fish, which you can source at the end of your ~/.config/fish/config.fish.

file "#{params[:home]}/.ssh/config" do
owner params[:user]
group params[:user]
content <<-EOH
Host github.com
IdentityFile ~/.ssh/github
IdentitiesOnly yes
StrictHostKeyChecking no
EOH
end
#I am using the port install apache version
#on top of that i have the debian structure of sites-enabled and sites-available simply
#by creating symlink from one folder to another
vhost_config_path = "/opt/local/apache2/conf"
desc "make vhost "
task :vhost_create do
require 'erb'
@site_domain = ENV["domain"]
@site_name = ENV["name"]
require 'resource_path'
require 'redirect_check'
require 'test/unit'
class HTTPRedirectTest < Test::Unit::TestCase
def default_test; end # placeholder to stop Test::Unit from complaining
def self.domain=(domain)
RedirectCheck.domain = domain

yUML Test On GitHub

yUML is a simple tool for embedding UML diagrams in wikis and blogs without needing any UML or diagramming tools.

Here's an idea of how it could be used in your repository readme.markdown or wiki.

View the RAW source to see how images are made.

Example

// ==UserScript==
// @name Google Maps Carbon
// @namespace http://www.amee.com
// @include http://maps.google.*/
// ==/UserScript==
// Created by James Smith, AMEE - [email protected]
// Public domain, do what you like :)
// Once you've installed the greasemonkey script (click "raw" on the top
@mrchrisadams
mrchrisadams / newpost.rb
Created February 28, 2010 22:06 — forked from jrk/newpost.rb
Create a blog post in jekyll
#!/usr/bin/env ruby
require Dir
unless ARGV[0]
puts 'Usage: newpost "the post title"'
exit(-1)
end
blog_root = "/Users/chrisadams/Code/notes"
:groups => {:app => {:gid => 1003},
:site => {:gid => 3001},
:support => {:gid => 3002}
},
:users => {
:app => {
:password => "$1$39393939393939393.",
:comment => "App User",
:uid => 1000,
:groups => [:app],
@mrchrisadams
mrchrisadams / newpost.rb
Created December 17, 2009 00:47 — forked from al3x/newpost.rb
#!/usr/bin/env ruby
unless ARGV[0]
puts 'Usage: newpost "the post title"'
exit(-1)
end
# set the date for the entry, where the jekyll blog is and process the title to give a filename:
date_prefix = Time.now.strftime("%Y-%m-%d")
postname = ARGV[0].strip.downcase.gsub(/ /, '-')