Skip to content

Instantly share code, notes, and snippets.

View meaganewaller's full-sized avatar

Meagan Waller meaganewaller

View GitHub Profile
@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
@JEG2
JEG2 / surprise.rb
Created February 19, 2015 15:28
Is this a bug in Ruby or just a poor method definition on my part?
class HashLike
def to_hash
{a: 1, b: 2}
end
end
def surprise(*args, keyword: nil)
p args
end
@Valarissa
Valarissa / pay_history.md
Created April 29, 2015 15:20
Pay Discussion History

...

Labor Unions & Worker's Rights

During the 1890's we saw the rise of a period of time known as the Progressive Era. There was a social consciousness surrounding everything from environmental concerns to worker's rights, from women's suffrage, to the rise of communism and socialism. People were concerned about the well-being of society as a whole, with the understanding that if we protect and help the least among us, the rest will benefit as well. This wasn't without horrifying racism and sexism which were still very much alive and well, which I could write an entirely different article on that hypocrisy, but not right now. Muckrakers, who were writers and journalists working undercover, typically, wrote scathing treatises

@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: "]');
}
@StanBoyet
StanBoyet / modal.slim.html
Created September 8, 2014 09:46
Boostrap Modal in Slim
/ Simple Slim translation of Bootstrap modal
.modal.fade.bs-example-modal-lg id="myModal" tabindex='-1' role='dialog' aria-labelledby="Modal Title" aria-hidden='true'
.modal-dialog.modal-lg
.modal-content
.modal-header
button.close type='button' data-dismiss='modal'
span aria-hidden='true' ×
span.sr-only Close
h4.modal-title = "Modal Title"
@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')));
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",
@xam7247
xam7247 / async_helper.txt
Last active March 31, 2021 12:59 — forked from mattwynne/gist:1228927
eventually helper method for making assertions against asynchronous systems
# usage:
# it "should return a result of 5" do
# eventually { long_running_thing.result.should eq(5) }
# end
module AsyncHelper
def eventually(options = {})
timeout = options[:timeout] || 2
interval = options[:interval] || 0.1
time_limit = Time.now + timeout
@kevinelliott
kevinelliott / osx-10.11-setup.md
Last active April 10, 2022 15:47
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.