Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
def respond_to(*mimes, &block) | |
raise ArgumentError, "respond_to takes either types or a block, never both" if mimes.any? && block_given? | |
if collector = retrieve_collector_from_mimes(mimes, &block) | |
response = collector.response | |
response ? response.call : default_render({}) | |
end | |
end | |
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 267 |
{ | |
"bold_folder_labels": true, | |
"caret_style": "wide", | |
"color_scheme": "Packages/User/SublimeLinter/Solarized (Light) (SL).tmTheme", | |
"detect_slow_plugins": false, | |
"dictionary": "Packages/Language - English/en_US.dic", | |
"draw_indent_guides": true, | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ |
var Schema = require('jugglingdb').Schema, | |
bcrypt = require('bcrypt'); | |
var schema = new Schema('postgres', { /* ... */ }); | |
var User = schema.define('User', { | |
email: { type: String, length: 255 }, | |
password: { type: String, length: 255 }, | |
salt: { type: String, length: 255, default: bcrypt.genSaltSync(10) }, | |
created: { type: Date, default: Date.now } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
ActiveRecord::Base.logger = Logger.new(STDOUT) |
module ActiveRecordMarshalable | |
def marshal_dump | |
[attributes, self.association_cache, instance_variable_get(:@new_record)] | |
end | |
def marshal_load data | |
send :initialize, data[0] | |
instance_variable_set :@association_cache, data[1] | |
instance_variable_set :@new_record, data[2] | |
end |
Jerry D'Antonio | |
github.com/jdantonio (all code, slides, and notes in a repo on github) | |
@jerrydantonio | |
From Ohio | |
Works at a Ruby and Erlang shop. |
# Download the file manually from here https://launchpad.net/gcc-arm-embedded | |
# Note: `curl` command doesn't work | |
# I downloaded this one: "gcc-arm-none-eabi-4_7-2013q3-20130916-mac.tar.bz2" | |
# double click it to unzip it | |
# Make a place to install it to | |
mkdir /usr/local/gcc_arm | |
# Move the unzipped stuff there. |
based on rage-quit support for bash
Put the files below inside ~/.oh-my-zsh/custom/plugins/fuck
Also chmod a+x
the flip
command.