Skip to content

Instantly share code, notes, and snippets.

@stephenmckinney
stephenmckinney / github-markdown.css
Created November 25, 2012 22:24 — forked from theconektd/github.css
Github Markdown CSS - for Marked.app or similar
body {
color: #333333;
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px;
}
@stephenmckinney
stephenmckinney / .tmux.conf
Created December 3, 2012 20:47
Vim + Tmux + Mac OS X Clipboard (pbcopy) integration
# Mac OS X clipboard integration
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# Optional keybindings: Enter Copy-mode and Copy and Paste sorta like Vim.
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
@stephenmckinney
stephenmckinney / gist:4234816
Created December 7, 2012 17:20
RVM YUNO ri! -> Generate Ruby's ri / rdoc documentation for all RVM rubies

See: https://rvm.io/rubies/docs/

In order to conserve space, RVM does not automatically generate and install each Ruby's ri / rdoc documentation.

Provided you have not cleaned up the extracted sources for all currently installed Rubies by executing 'rvm cleanup all' then you can install the docs for all currently installed Rubies by executing:

rvm all do rvm docs generate all

Now execute:

@stephenmckinney
stephenmckinney / .rvmrc
Created December 10, 2012 13:18
Sane RVM settings
rvm_project_rvmrc_default=1 # To enable switching to default / system when leaving a directory set
rvm_without_gems="rubygems-bundler" # Use Bundler binstubs instead
export rvm_ignore_gemsets_flag=1 # Ignore all gemsets
@stephenmckinney
stephenmckinney / vim-command-t-bug.md
Created December 19, 2012 20:21
When NERDTree is open; opening a file in a vertical split resizes the buffer strangely

##To reproduce:

  • Open vim
  • Open NERDTree
  • Open a file
  • At this point Vim looks like this screenshot
  • Open Command-T, select a file, and press . This opens the file in a vertical split.
  • At this point Vim looks like this screenshot
  • Stay in that right-most vertical split.
  • Open Command-T, select a file, and press . This opens the file in the right-most vertical split (since it's active).
@stephenmckinney
stephenmckinney / zsh_prezto_rbenv_post_rvm.md
Last active December 10, 2015 16:19
Moving from RVM to rbenv with prezto on Mac OS X Mountain Lion

Uninstall RVM

rvm implode

Then remove any reference to RVM in .z* files.

Install rbenv

@stephenmckinney
stephenmckinney / Procfile
Created January 10, 2013 21:28
Jekyll draft -> publish workflow + SASS compilation + rsync deploy View draft posts locally but not in production.
web: jekyll --server --auto --future
comapss: compass watch --output-style expanded
@stephenmckinney
stephenmckinney / cards_fix.rb
Last active August 29, 2015 14:14
Vox.com Card Stacks fix
# Run using: bundle exec rails runner cards_fix.rb
current_community = Network.vox.communities.first
card_stacks = ExplainerGroup.published_on_community(current_community)
card_stacks.each do |card_stack|
explainer_group = card_stack.hub_page.entry_group
cards = explainer_group.all_explainer_cards
cards.each do |card|
card.explainer_groups << explainer_group
card.save!
end
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index f9f063c..5a995e2 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -13,6 +13,12 @@ class AccountController < ApplicationController
prepend_network_view_paths!
+ def foo
+ respond_to do |format|
diff --git a/lib/presto/serializer/mixins/entries.rb b/lib/presto/serializer/mixins/entries.rb
index 087f6b8..2ab89e1 100644
--- a/lib/presto/serializer/mixins/entries.rb
+++ b/lib/presto/serializer/mixins/entries.rb
@@ -125,7 +125,7 @@ module Presto::Serializer::Mixins::Entries
:timestamp => entry.modified_date.to_i, # seconds since Jan 1 1970 00:00:00 UTC
:title => entry.title_plain,
:type => entry.type,
- :url => SbnUrls.url_for_entry(entry, {:current_community => context.current_community}),
+ :url => SbnUrls.url_for_entry(entry, {:community => context.current_community}),