Skip to content

Instantly share code, notes, and snippets.

# Application Generator Template
# Modifies a Rails app to use Mongoid, Devise, jQuery, Haml
# Usage: rails new app_name -m http://gist.github.com/raw/452364/gistfile1.txt
# More info: http://github.com/fortuity/rails3-mongoid-devise/
# If you are customizing this template, you can use any methods provided by Thor::Actions
# http://rdoc.info/rdoc/wycats/thor/blob/f939a3e8a854616784cac1dcff04ef4f3ee5f7ff/Thor/Actions.html
# and Rails::Generators::Actions
# http://github.com/rails/rails/blob/master/railties/lib/rails/generators/actions.rb
@andruby
andruby / ubuntu-11.10-gems.erb
Created March 27, 2012 20:51 — forked from kashif/ubuntu-11.10-gems.erb
Chef bootstrap With rvm and ruby 1.9.3 on ubuntu 11.10
bash -c '
<% if knife_config[:bootstrap_proxy] -%>
(
cat <<'EOP'
<%= "proxy = #{knife_config[:bootstrap_proxy]}" %>
EOP
) > ~/.curlrc
<% end -%>
if [ ! -f /usr/bin/chef-client ]; then
@andruby
andruby / encfs-agent.py
Last active August 29, 2015 14:04 — forked from mprymek/encfs-agent
#! /usr/bin/env python2
"""
encfs-agent
Mounts encfs filesystems with passwords generated using private keys stored in ssh-agent.
You can have any number of encrypted filesystems ("vaults") under VAULTS_DIR. Password for
each of them is derived from its name and given private key stored in ssh-agent.
You can use ssh-askpass for ssh-agent if you want.
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andruby
andruby / gist:b8136abee4321bb24eecd9c6e793ebbc
Created March 31, 2017 15:23 — forked from clintel/gist:1155906
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code