Blocks are kind of like functions. The store a sequence of expressions to be evaluated later. They are a value, so like any value they need to be bound to a name to be stored.
let first = {
print 'Hello, world!'
}
> units | |
Currency exchange rates from 2012-10-24 | |
2570 units, 85 prefixes, 66 nonlinear units | |
You have: (1*2*3*4*5*6*7*8*9*10) seconds | |
You want: days | |
* 42 | |
/ 0.023809524 | |
URxvt.background: black | |
URxvt.foreground: grey | |
URxvt.scrollBar: false | |
URxvt.cursorBlink: true | |
URxvt.imLocale: en_US.utf8 | |
URxvt.termName: screen-256color-bce | |
URxvt.fading: 10 | |
URxvt.saveLines: 40960 | |
URxvt.visualBall: true |
function uploadImage { | |
curl -s -F "image=@$1" -F "key=SOME_IMGUR_KEY_THING" http://imgur.com/api/upload.xml | grep -E -o "<original_image>(.)*</original_image>" | grep -E -o "http://i.imgur.com/[^<]*" | |
} | |
scrot -s "/tmp/shot.png" | |
if [ $? -eq 0 ]; then | |
uploadImage "/tmp/shot.png" | xclip | |
rm "/tmp/shot.png" | |
notify-send "Uploaded screenshot to imgur. URL is on the clipboard." | |
else |
class Document(ModelBase): | |
links_to_this = models.ManyToManyField('self', related_name='this_links_to', | |
symmetrical=False, through='DocumentLink') | |
class DocumentLink(ModelBase): | |
linked_from = models.ForeignKey(Document, related_name='documentlink_from_set') | |
linked_to = models.ForeignKey(Document, related_name='documentlink_to_set') | |
type = models.CharField(max_length=16) |
icon_size 16 | |
background "#101010" | |
geometry 6x1+1504+0 | |
max_geometry 6x1 | |
icon_gravity NE | |
dockapp_mode simple | |
window_type dock | |
kludges force_icons_size |
autoload promptinit | |
promptinit | |
setopt prompt_subst | |
autoload -Uz vcs_info | |
if vcs_info 2> /dev/null; then | |
zstyle ':vcs_info:*' enable git | |
zstyle ':vcs_info:git*:*' get-revision true | |
zstyle ':vcs_info:git*:*' check-for-changes true |
What I have: | |
. | |
├── static/ | |
│ └── stuff | |
├── README.md | |
├── chat.js | |
├── clients.js | |
├── config.js | |
├── config.json-dist |
#!/bin/sh | |
# Usage: `git url` or `git url <commitish>` | |
# | |
# * copies the commit's github url to your clipboard | |
# * prints out the log message | |
# * opens the bugzilla page if it found a bug number | |
# | |
# Assumes that the canonical remote is named upstream. | |
# Works on Linux |
#!/bin/bash | |
function remote_by_name() { | |
name=$1 | |
remote_line=$(git remote -v | grep push | grep $name) | |
if [[ -z $remote_line ]]; then | |
echo "Error: remote '$name' not found." | |
exit 1 |