View bootstrap_ms.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.col-ms-1, | |
.col-ms-2, | |
.col-ms-3, | |
.col-ms-4, | |
.col-ms-5, | |
.col-ms-6, | |
.col-ms-7, | |
.col-ms-8, | |
.col-ms-9, | |
.col-ms-10, |
View bootstrap_ms.css.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3. | |
// | |
// This is a hack to fill the gap between 480 and 760 pixels - a missing range | |
// in the bootstrap responsive grid structure. Use these classes to style pages | |
// on cellphones when they transition from portrait to landscape. | |
// | |
// NOTE: Here I use SASS instead of LESS for styling. To convert to LESS | |
// replace '$screen' with '@screen' and '$grid' with '@grid'. | |
// | |
// See https://github.com/twbs/bootstrap/issues/10203 for more info. |
View minimal typeahead
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
R = React.DOM | |
nations = ['britain', 'ireland', 'norway', 'sweden', 'denmark', 'germany', | |
'holland', 'belgium', 'france', 'spain', 'portugal', 'italy', 'switzerland'] | |
Typeahead = React.createClass | |
getInitialState : -> {input: ""} | |
handleChange : -> @setState input: @refs.field.getDOMNode().value | |
handleClick : (nation)-> @setState input: nation | |
matches : (input)-> |
View extension.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const vscode = require('vscode'); | |
const shelljs = require('shelljs'); | |
// This extension is a hack to explore a possible VsCode way to search | |
// for a directory name. | |
// | |
// In IntelliJ you can search for a directory by ending the search string with '/'. | |
// In Vim, you can `:call fzf#run({'source': 'fd -t d', 'sink': 'NERDTreeFind'})` | |
// | |
// But VsCode doesn't seem to provide an API to open the current |
View extension.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const vscode = require('vscode'); | |
const shelljs = require('shelljs'); | |
// This extension is a hack to explore a possible VsCode way to search | |
// for a directory name. | |
// | |
// In IntelliJ you can search for a directory by ending the search string with '/'. | |
// In Vim, you can `:call fzf#run({'source': 'fd -t d', 'sink': 'NERDTreeFind'})` | |
// | |
// But VsCode doesn't seem to provide an API to open the current |
View load
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script mounts the encrypted directoy "./.encdata" on the plain-text | |
# directory "./data". | |
# It was written for use with `ledger-cli`, in response to a thread on the | |
# ledger mailing list. | |
# See https://groups.google.com/forum/#!topic/ledger-cli/7yM9GMhHqyY |
View test_images.js.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file contains data-uri encoded images for testing. | |
# The advantage of data-encoded images for testing include: | |
# - no need for standalone web server | |
# - faster (synchronous?) image loading | |
# The images were originally generated by http://placehold.it | |
# To save a test image: `curl -o http://placehold.it/200x200.gif` | |
# To data-encode a test image, visit http://websemantics.co.uk/online_tools/image_to_data_uri_convertor/result/ | |
# TODO: find a command-line converter... |
View message.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta http-equiv="Content-Type" content="text/html; charset=<%= encoding %>"> | |
<% if mail.subject %> | |
<title><%= h mail.subject %></title> | |
<% end %> | |
<style type="text/css"> | |
.message_headers { | |
width: 100%; | |
padding: 10px 0 0 0; | |
margin: 0; |
View rm_auto_display_formatter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rspec/core/example' | |
require 'rspec/core/formatters/progress_formatter' | |
require 'colored' | |
class RSpec::Core::Example | |
attr_reader :example_block | |
end | |
# Custom formatter for Rspec - intended for use with RubyMine |
View 30lines1.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
DATA = <<-EOF | |
A, B, C | |
A, C, E | |
E, F, D | |
D, A, J | |
E, D, J | |
EOF |
NewerOlder