Skip to content

Instantly share code, notes, and snippets.

View drydevelopment's full-sized avatar

Doug Yoder drydevelopment

View GitHub Profile
@drydevelopment
drydevelopment / too_many_open_files.md
Last active January 17, 2019 19:21
Too many open files - macOS Workaround

Too many open files - macOS Workaround

  1. Creating a launchd Property List File

    Create a launchd property list file, and paste the followin snippet at /Library/LaunchDaemons/limit.maxfiles.plist.

    <?xml version="1.0" encoding="UTF-8"?>  
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"  
    	"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    
@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active February 7, 2024 19:19
Install mysql2 on MacOS Mojave

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

@afeld
afeld / gist:5704079
Last active November 27, 2023 15:43
Using Rails+Bower on Heroku
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@purcell
purcell / application_helper.rb
Created September 9, 2011 09:23
Make will_paginate generate HTML that bootstrap.less will render nicely
# Based on https://gist.github.com/1182136
class BootstrapLinkRenderer < ::WillPaginate::ActionView::LinkRenderer
protected
def html_container(html)
tag :div, tag(:ul, html), container_attributes
end
def page_number(page)
tag :li, link(page, page, :rel => rel_value(page)), :class => ('active' if page == current_page)
@scottwater
scottwater / mail_queue.rb
Created April 26, 2011 14:24
A really simple general purpose mail queue for resque
module MailQueue
extend self
def queue
:default
end
def perform(options = {})
options = options.with_indifferent_access
@tommeier
tommeier / install_rvm.sh
Created February 10, 2011 00:20
Install RVM via bash script - Flawless Victory!
function install_rvm {
#Instructions : http://rvm.beginrescueend.com/rvm/install/
echo "===> Installing RVM >>"
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
#Reload shell
. ~/.rvm/scripts/rvm
result=`type rvm | head -1`
echo "===> Result of testing RVM : '$result'"
@karmi
karmi / workers.rake
Created July 22, 2010 15:58
Rake taks to launch multiple Resque workers in development/production with simple management included
# Rake task to launch multiple Resque workers in development/production with simple management included
require 'resque/tasks' # Require Resque tasks
namespace :workers do
# = $ rake workers:start
#
# Launch multiple Resque workers with the Rails environment loaded,
# so they have access to your models, etc.