Skip to content

Instantly share code, notes, and snippets.

View meaganewaller's full-sized avatar

Meagan Waller meaganewaller

View GitHub Profile
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@trey
trey / rails_bootstrap_delete_confirmation_modal.md
Created February 8, 2012 05:12
A nice delete confirmation modal in Rails courtesy of Bootstrap

Here's what you get.

Some JavaScript

// Delete confirmation modals
$('#delete-confirm').on('show', function() {
  var $submit = $(this).find('.btn-danger'),
      href = $submit.attr('href');
  $submit.attr('href', href.replace('pony', $(this).data('id')));
@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:

assets_path = File.expand_path("~/projects/rails/scout/public")
log_path = File.expand_path "~/assets.txt"
temp_requested_files_path = File.expand_path "~/processed_assets.txt"
ignore_pattern = /sparkline|datejs/
known_used =[
"javascripts/jquery-1.7.1.min.js",
"javascripts/jquery.extensions.js",
"javascripts/application.js",
"stylesheets/default.css",
@toddq
toddq / README.md
Last active October 13, 2022 07:03 — forked from iainjmitchell/README.md

##Description Simple Dashing widget (and associated job) to display RSS feeds. Based on Iaian Mitchell's News widget.

##Screenshot

##Dependencies nokogiri

htmlentities

@moriarty
moriarty / git-set-user.sh
Created November 29, 2013 13:18
script to set ~/.gitconfig to students gitconfig written for youbot
#!/usr/bin/env bash
#
# This is a shared machine. I have added this
# quick script to set the git config variables
#
# If you want this to work add
#
if [ -d ~/gitconfig ]; then
@arlandism
arlandism / gist:7759985
Created December 2, 2013 22:09
Mocks
public class MyPrinter implements MyPrinterInterface(){
@Override
public void printToScreen(String toPrint){
System.out.println(toPrint);
}
}
public class MyPrinterMock implements MyPrinterInterface(){
@srikat
srikat / functions.php
Created January 8, 2014 06:11
Moving Post Categories from Entry Meta to above Post Title in Genesis. http://sridharkatakam.com/moving-post-categories-entry-meta-post-title-genesis/
//* Add Post categories above Post title on single Posts
add_action ( 'genesis_entry_header', 'sk_show_category_name', 9 );
function sk_show_category_name() {
if ( ! is_singular('post') )
return;
echo do_shortcode('[post_categories before="Filed Under: "]');
}
@rewinfrey
rewinfrey / recoli.rb
Last active August 29, 2015 13:57
Repositories, Contexts (Use Cases), Context Library
# Establishing a top level namespace for a given module (Context Library),
# that serves as the internal API for a component of a system
# is a great way to begin the process of extracting that component
# from its containing environment.
# Benefits include:
# A well defined boundary of responsibilities
# More DRY (less duplicated knowledge of the way a component works)
# Isolates points of contact between component and containing system
# Expresses a clear and simple definition of the component's responsibilities defined by use case
@lfender6445
lfender6445 / gist:9919357
Last active May 2, 2024 22:40
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger