- line up/down.
- page up/down (or 1/2 page).
- left/right.
- word left/right.
- end of line / beginning of text on this line / 0-column on this line.
- beginning of file / end of file.
- drop/goto placeholder (marks).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# | |
# Simple init.d script I wrote for starting/stopping mongod. | |
# Copyright (c) 2012 Robert Martin | |
# | |
# Filename: /etc/init.d/mongod | |
# (so rename it from mongod.sh to mongod) | |
# | |
### BEGIN INIT INFO | |
# Provides: mongod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>Here's an example:</p> | |
<p class="gist">https://gist.github.com/2554645</p> | |
<p>Woah. Meta.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Deeper." | |
. bashception.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
, http = require('http') | |
, connect = require('connect') | |
, io = require('socket.io'); | |
var app = express(); | |
/* NOTE: We'll need to refer to the sessionStore container later. To | |
* accomplish this, we'll create our own and pass it to Express | |
* rather than letting it create its own. */ | |
var sessionStore = new connect.session.MemoryStore(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
└─┬ [email protected] | |
├── [email protected] | |
├─┬ [email protected] | |
│ └── [email protected] <--- make derpy | |
├─┬ [email protected] | |
│ └─┬ [email protected] | |
│ └─┬ [email protected] | |
│ └── [email protected] | |
├── [email protected] | |
├── [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Recommend to add aliases in `~/.bashrc` to use this scripts. For example: | |
alias cd='. ~/bin/cd-pushd.sh' | |
alias d='. ~/bin/dirs-good' | |
Causes, for example: | |
$ d 0 ~/bin | |
1 ~ | |
2 /srv/www/project/ ... /long-directory-name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo su | |
# fdisk /dev/sda | |
Command (m for help): p | |
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes | |
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors | |
Units = sectors of 1 * 512 = 512 bytes | |
Sector size (logical/physical): 512 bytes / 512 bytes | |
I/O size (minimum/optimal): 512 bytes / 512 bytes | |
Disk identifier: 0xff3231fe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<meta charset="utf-8"> | |
<!-- author: Robert Martin --> | |
<style> | |
body { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
margin: auto; | |
position: relative; |
taken from https://github.com/bobbydavid/dag-visualization at 6/22/13.
The algorithm is:
Create a random DAG (topographically sorted).
Determine X-positions. For each node, find it's minimum X-position. Then, in reverse order, find the maximum X-position of nodes that can be moved forward.
Determine Y-positions. For each node, place it as near as possible to the mean Y-position of its parents. Give preference to placing nodes that have a single parent with a single child (a 1-1 relationship), so that these will always be shown in a straight line.
OlderNewer