As configured in my dotfiles.
start new:
tmux
start new with session name:
| ☻ (。╹ω╹。) | |
| ☻ ლ(╹◡╹ლ) | |
| ☻ (●´⌓`●) | |
| ☻ ([∂]ω[∂]) | |
| ☻ <犬> | |
| ☻ U^エ^U | |
| ☻ <泣> | |
| ☻ (〒ó〒) | |
| ☻ (T^T) | |
| ☻ (íoì) |
| var dgram = require('dgram'); // dgram is UDP | |
| // Listen for responses | |
| function listen(port) { | |
| var server = dgram.createSocket("udp4"); | |
| server.on("message", function (msg, rinfo) { | |
| console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port); | |
| }); |
| # app/models/ability.rb | |
| # All front end users are authorized using this class | |
| class Ability | |
| include CanCan::Ability | |
| def initialize(user) | |
| user ||= User.new | |
| can :read, :all |
| /* | |
| * This work is free. You can redistribute it and/or modify it under the | |
| * terms of the Do What The Fuck You Want To Public License, Version 2, | |
| * as published by Sam Hocevar. See the COPYING file for more details. | |
| */ | |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { |
| /* just webkit, 'cause yeah... */ | |
| @-webkit-keyframes wobble { | |
| 0% { -webkit-transform: rotate(0deg); } | |
| 20% { -webkit-transform: rotate(2deg); } | |
| 50% { -webkit-transform: rotate(-2deg); } | |
| 100% { -webkit-transform: rotate(0deg); } | |
| } | |
| .wobble { -webkit-animation: wobble 5s infinite; } |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| { | |
| "AL": "Alabama", | |
| "AK": "Alaska", | |
| "AS": "American Samoa", | |
| "AZ": "Arizona", | |
| "AR": "Arkansas", | |
| "CA": "California", | |
| "CO": "Colorado", | |
| "CT": "Connecticut", | |
| "DE": "Delaware", |
| # put this in your ~/.irbrc | |
| begin | |
| require 'pry' | |
| Pry.start | |
| exit | |
| rescue LoadError | |
| puts "Pry not found, using 'irb' instead. Try\n gem install pry" | |
| end |
$ ActiveRecord::Base.connection.reset_pk_sequence!('table_name')
If you need the table names:
$ ActiveRecord::Base.connection.tables
=> ["accounts", "assets", ...]