Skip to content

Instantly share code, notes, and snippets.

View carols10cents's full-sized avatar

Carol (Nichols || Goulding) carols10cents

View GitHub Profile
@carols10cents
carols10cents / .bashrc
Created April 17, 2014 22:48
Test command with tab completion
# Add this to your .bashrc:
source ~/.test_completion.sh
@carols10cents
carols10cents / gist:ea6e6d492c72df325dc1
Last active August 29, 2015 14:05
http://rstat.us is dead. Long live rstat.us?

http://rstat.us is dead. Long live rstat.us?

Hey everyone,

As you may have noticed, I have been a Bad Open Source Maintainer and I have not been doing even the minimum amount of maintenance on either the codebase or the main node living at http://rstat.us.

Wilkie has been poking around the code lately, and I'm encouraged because he's got his own node running.

Which brings me to the point of this email-- growing http://rstat.us was never the dream of this project, the dream was to have everyone owning and operating their own nodes that would talk to each other.

WARNING - INCOMPLETE AND MIGHT BE WRONG

I'm not a C# dev and haven't gotten one to look at this yet, it might be very very wrong.

C# to Rust Cheat Sheet

The goal of this is to have an easily-scannable reference for the most common syntax idioms in C# and Rust so that programmers most comfortable with C# can quickly get through the syntax differences and feel like they could read and write basic Rust programs.

What do you think? Does this meet its goal? If not, why not?

@mig
mig / minispec.rb
Created October 31, 2010 21:28
I want to use minitest in a Rails project with spec like syntax (work in progress)
class Object
cattr_accessor :current_test
end
module Minispec
class TestClass
def self.prepare(desc)
name = name_for_class(desc)
Class.new(base_test_class(name)) do
define_singleton_method(:name) { name }
@tenderlove
tenderlove / person_test.rb
Created February 10, 2011 23:10
Use minitest/spec with Rails 3
require 'test_helper'
require 'minitest/autorun'
class MiniTest::Spec
include ActiveSupport::Testing::SetupAndTeardown
include ActiveRecord::TestFixtures
alias :method_name :__name__ if defined? :__name__
self.fixture_path = File.join(Rails.root, 'test', 'fixtures')
end
@steveklabnik
steveklabnik / http.rb
Created March 24, 2012 20:27
A Shoes hypermedia client for ALPS microblogging
require 'net/http'
require 'open-uri'
require 'hpricot'
# A simple get request should not require this much boilerplate.
def fetch_data(uri)
uri = URI(uri)
req = Net::HTTP::Get.new(uri.request_uri)
req['Accept'] = "application/xhtml+xml"
@justincampbell
justincampbell / scrc-day1.md
Created August 3, 2012 21:49
Steel City Ruby Conf 2012

Getting the most out if a Conference - Jeff Casimir

Why are we here? Ruby community is awesome New people are awesome Developers are exhausted by social interaction Recharge with a movie by yourself Conferences are about starting conversation Its hard Introvert != shy

@pvh
pvh / gist:4634543
Last active December 11, 2015 17:28
Postgres: The Bits You Haven't Found talk
A Beastiary of Badassery
-
SQLisms
--
WITH
arrays and unnest
window functions
JSON
row types
@carols10cents
carols10cents / gist:6049798
Created July 21, 2013 20:12
Slim 2.0 deprecation warnings
# How to find files that have spaces around attribute delimiters
git ls-files *.slim* | xargs -I {} slimrb -c {} | grep "spaces around attribute delimiters"
@hadees
hadees / gist:7308571
Last active December 27, 2015 10:09 — forked from ericboehs/gist:7125105
Poltergeist hack to silence CoreText performance notes from phantomjs that works with billy.
module Capybara::Poltergeist
class Client
private
def redirect_stdout
prev = STDOUT.dup
prev.autoclose = false
$stdout = @write_io
STDOUT.reopen(@write_io)
prev = STDERR.dup