First, an exercise. Can we represent all of css with plain data? Let's try.
let redText = { color: 'red' };
#!/usr/bin/awk -f | |
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff | |
# My copy here is written in awk instead of C, has no compelling benefit. | |
# Public domain. @thingskatedid | |
# Run as awk -v x=xyz ... or env variables for stuff? | |
# Assumptions: the data is evenly spaced along the x-axis | |
# TODO: moving average |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
Here are all of the resources mentioned by Deconstruct 2017 speakers, along with who recommended what. Please post a comment if I missed something or have an error!
" The custom ignore feature in ctrlp.vim is a useful feature | |
" when you want to ignore files and folder in your directory | |
" structure. However if yo set g:ctrlp_user_command then | |
" g:ctrlp_custom_ignore had no effect. This is all well and | |
" and good unless you use a vim distribution like spf13-vim | |
" that just so happens to set g:ctrlp_user_command. So here | |
" is how you get around that issue in your own .vimrc.local: | |
" | |
" unlet the original spf13-vim settings | |
unlet g:ctrlp_custom_ignore |
# Get Sublime Text to use your rvm ruby without hardcoding a `$USER`. | |
# | |
# Include the configurations below the commend in the appropriate file listed below: | |
# | |
# - OS X ST2: ~/Library/Application Support/Sublime Text 2/Packages/Ruby/Ruby.sublime-build | |
# - OS X ST3: ~/Library/Application Support/Sublime Text 3/Packages/User/Ruby.sublime-build | |
# - Linux ST2: ~/.config/sublime-text-2/Packages/Ruby/Ruby.sublime-build | |
# - Linux ST3: ~/.config/sublime-text-3/Packages/User/Ruby.sublime-build | |
{ |
# Public: A module to be mixed in another class with common methods to index | |
# records in ElasticSearch. | |
# | |
# The host object needs to respond to 'indexed_attributes', which will return | |
# an array of the attributes names to be indexed. | |
# | |
# It's also recommended to override the 'save?' method to make sure only | |
# records that match some specifications are indexed. | |
# | |
# The type used for the ElasticSearch index will be extracted from the name of |
I like writing API wrappers, and I've actually written quite a few over the past year -- including ones for the EPA's API, the St. Louis FRED API, and the Rotten Tomatoes API. I also created a site (with an external API) to help add some panache to your boring Lorem Ipsum text.
require 'rubygems' | |
require 'bundler' | |
Bundler.require | |
require './application' | |
namespace :assets do | |
desc 'compile assets' | |
task :compile => [:compile_js, :compile_css] do | |
end |
function nestCollection(model, attributeName, nestedCollection) { | |
//setup nested references | |
for (var i = 0; i < nestedCollection.length; i++) { | |
model.attributes[attributeName][i] = nestedCollection.at(i).attributes; | |
} | |
//create empty arrays if none | |
nestedCollection.bind('add', function (initiative) { | |
if (!model.get(attributeName)) { | |
model.attributes[attributeName] = []; |