tmux new [-s name] [cmd](:new) - new session
tmux ls(:ls) - list sessionstmux switch [-t name](:switch) - switches to an existing session
| # verified against log_in.feature for blake | |
| # https://github.com/jnicklas/capybara/issues/1443 | |
| # turn on webkit driver debug | |
| $use_webkit = true | |
| $use_chrome_instead_of_firefox = false | |
| $webkit_debug = false | |
| $wait_time = 5 | |
| def webkit_driver | |
| if $webkit_debug |
| self.grid.jqGrid("setGridParam", { | |
| serializeGridData: self.serializeData, | |
| url: self.executionUrl, | |
| datatype: "json", | |
| ajaxGridOptions: { | |
| cache: false, | |
| contentType: "application/json", | |
| processData: false, | |
| type: "POST" | |
| }, |
| #!/bin/bash | |
| mkdir -p ~/.ssh | |
| # generate new personal ed25519 ssh keys | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>" | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>" | |
| # generate new host cert authority (host_ca) ed25519 ssh key | |
| # used for signing host keys and creating host certs |
Useful for when a blocking user experience is needed (in my case, didn't want people unwittingly loosing their place by scrolling while a modal required their attention): $.scrollLock() locks the body in place, preventing scroll until it is unlocked.
// Locks the page if it's currently unlocked
$.scrollLock();
// ...or vice versa
| #!/bin/bash | |
| ## | |
| ## Simple logging mechanism for Bash | |
| ## | |
| ## Author: Michael Wayne Goodman <goodman.m.w@gmail.com> | |
| ## Thanks: Jul for the idea to add a datestring. See: | |
| ## http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/#comment-5854 | |
| ## Thanks: @gffhcks for noting that inf() and debug() should be swapped, | |
| ## and that critical() used $2 instead of $1 |
| #!/bin/bash | |
| # | |
| # URI parsing function | |
| # | |
| # The function creates global variables with the parsed results. | |
| # It returns 0 if parsing was successful or non-zero otherwise. | |
| # | |
| # [schema://][user[:password]@]host[:port][/path][?[arg1=val1]...][#fragment] | |
| # |
| import json, datetime | |
| class RoundTripEncoder(json.JSONEncoder): | |
| DATE_FORMAT = "%Y-%m-%d" | |
| TIME_FORMAT = "%H:%M:%S" | |
| def default(self, obj): | |
| if isinstance(obj, datetime.datetime): | |
| return { | |
| "_type": "datetime", | |
| "value": obj.strftime("%s %s" % ( |
| class CustomUsersController < Devise::RegistrationsController | |
| def new | |
| super | |
| end | |
| def create | |
| build_resource(sign_up_params) | |
| if resource.save | |
| set_text_message |
| " copy all this into a vim buffer, save it, then... | |
| " source the file by typing :so % | |
| " Now the vim buffer acts like a specialized application for mastering vim | |
| " There are two queues, Study and Known. Depending how confident you feel | |
| " about the item you are currently learning, you can move it down several | |
| " positions, all the way to the end of the Study queue, or to the Known | |
| " queue. | |
| " type ,, (that's comma comma) |