Skip to content

Instantly share code, notes, and snippets.

View carols10cents's full-sized avatar

Carol (Nichols || Goulding) carols10cents

View GitHub Profile
@carols10cents
carols10cents / gist:6db96f8c848432460a63
Last active August 29, 2015 14:05
Heroku ruby + node buildpack issues

TL;DR Solution

I got it to work! The solution was setting GEM_HOME in the node buildpack to the directory the ruby buildpack installed the gems into, then adding that dir's bin and the ruby executable location to the PATH:

export GEM_HOME=$build_dir/vendor/bundle/ruby/2.0.0/
PATH=$GEM_HOME/bin:$build_dir/vendor/bundle/bin:$build_dir/vendor/ruby-2.0.0/bin:$PATH
@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.

@carols10cents
carols10cents / allowed-by-apple.html
Last active August 29, 2015 14:03
Apple content filters
<html>
<body>
p parallelogr p
</body>
</html>

The targets seem to work as I would expect:

$ make check-stage2-cfail
cfg: build triple x86_64-apple-darwin
cfg: host triples x86_64-apple-darwin
cfg: target triples x86_64-apple-darwin
cfg: enabling more debugging (CFG_ENABLE_DEBUG)
cfg: host for x86_64-apple-darwin is x86_64
cfg: os for x86_64-apple-darwin is apple-darwin
@carols10cents
carols10cents / gist:d7bf8697b25ed456d58c
Last active August 29, 2015 14:01
capital cities safe and sound
Capital Cities: Safe and Sound
HH:|----------------|
T:|--------ooo-----|
S:|----------------|
B:|------------o---|
HH:|--x---x---x---x-|--x---x---x---x-|--x---x---x---x-|--x---x---x---x-|
S:|----o-------o---|----o-------o---|----o-------o---|----o-----o-o---|
B:|o-------o-------|o-------o-------|o-------o-------|o-------o-------|
@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:8526130
Last active January 3, 2016 22:09
More betterer

Motivation

"Forgive my ignorance here, but isn't usemin trying to do too much? Couldn't we just leave minificiation out of usemin all together and use the actual uglify/cssmin/etc tasks to minify the concatenated files?"

Overall Workflow

  1. grunt-contrib-uglify special flag: Goal is to use pre-minified files, if they exist, instead of re-uglifying files in the src glob. Fixes grunt-usemin issue #171.
  • Input: src glob (may contain .js and/or .min.js files)
  • Output: dest file(s)
@carols10cents
carols10cents / ajax_settings.coffee
Last active April 11, 2019 16:35
One way to get Rails and Backbone CSRF protection working
# In your Backbone app, wherever you want -- we put this in lib/ajax_settings.coffee
define [
'backbone',
'cookie' # This is https://github.com/js-coder/cookie.js,
# we have a bower-compatible fork at https://github.com/thinkthroughmath/cookie.js
], (Backbone, cookie) ->
init: ->
# This overrides all ajax requests sent through Backbone. We could have set this in jQuery
# since Backbone ultimately calls the jQuery ajax functions, but we decided we shouldn't be
# doing ajax requests outside of Backbone anyway.
@carols10cents
carols10cents / ideas.md
Last active December 29, 2015 19:49
Debugging game ideas

Background

I love Papers, Please and how it uses the mechanics of doing the job of an immigration officer to teach ethics, basically.

I'd like to illustrate and teach one of the fundamental skills that I use in my job as a programmer every day-- how to debug a problem. I don't think we need to use code to teach these skills, necessarily, so I had this idea for a similar type of game.

Ideas to teach/reinforce/reward

  • Experimentation
  • Don't be afraid to just try something
@carols10cents
carols10cents / gist:7685565
Last active December 29, 2015 14:39
TTM's possibly generally useful custom HipChat Emoticons. We have a lot more but they're mostly inside jokes or copied over from http://www.emoji-cheat-sheet.com/