start new:
tmux
start new with session name:
tmux new -s myname
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
# that enables you to choose a character from a menu of options. If you are on Lion | |
# try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
# for input. | |
# | |
# It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
# as it means you cannot press and hold h/j/k/l to move through your file. You have | |
# to repeatedly press the keys to navigate. |
/** | |
* Generates JavaScript version of HTML templates for AngularJS as part of a Grunt build | |
* | |
* Allows for bundling into multiple collections, for applications that are distributed across more than one page. | |
* | |
* Usage (in grunt.initConfig): | |
* | |
* html2js: { | |
* firstTemplateCollection: { | |
* src: ['<%= src.first %>'], |
/** | |
* Naive AngularJS module autoloader; depends on require.js. | |
* | |
* Usage: | |
* | |
* angular.autoLoad({ | |
* 'ngResource': '/js/angular-resource-1.0.1.min.js', | |
* 'google-maps': '/js/angular-google-maps.js', | |
* 'ui.bootstrap': '/js/ui/ui-bootstrap-custom-tpls-0.4.0.min.js', | |
* 'module.split.over.multiple.files': ['/js/file1.js', '/js/file2.js'] |
#!/bin/sh | |
# | |
# Janos Kasza (@janoskk) | |
# | |
# Creates (if necessary) and replicates all databases from a couchdb server to another one | |
# | |
if [ -z "$2" ]; then | |
cat <<EOF | |
Usage: $0 <sourceUrl> <targetUrl> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
The new Cloudant query API is pretty awesome. It basically looks like Mongo, which makes for much more readable and user-friendly queries than what you can get with standard map/reduce.
Index the field foo
:
cinnabar:~ nolan$ acurl -X POST https://pouch.cloudant.com/mydb/_index -d '{
> "index": {
> "fields": ["foo"]
> },
So, I just learned that gf
exists. If your cursor is over a path in vim, and you type gf, it'll open that file/dir in a new buffer. You can also open in a new window/tab as detailed here.
In node, it'd be great if you could jump to a required
file, huh? Trouble is, typically you don't put the .js
on your require('./path/to/a/js/file')
. No matter, vim has your back, just add set suffixesadd+=.js
to your .vimrc and vim will try adding .js and see if it can find that file instead.
If you do a lot of spelunking in node_modules, it'd be great if you could jump to the directory of a required npm module too, right? A la, require('my-awesome-module')
. Well, you can add set path+=$PWD/node_modules
to your .vimrc too, and vim will add node_modules to the path, and jump to it's directory in node_modules (caveat: you must have opened vim from your project root for this too work).
For your cmd+c convenience:
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important
or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?