Yankpad

Yankpad

Download the raw file.

org-mode

ae: Agenda Entry

I use it to insert a new appointment in my agenda (kept in org-mode).

** $1
   :PROPERTIES:
   :LOCATION: $2
   :ATTENDEES: $3
   :END:
   `(org-time-stamp 1)`

   $0

ruby-mode

map: Map

.map { |x| $0 }

each: Each

.each do |x|
  $0
end

if: Condition

if $0 then
  $1
else
  $2
end

hledger-mode

These are some snippets to simplify data entry in my ledger file (based on hledger).

cw: cash withdrawal

When I withdraw cash from the bank, it gets in my pocket.

`(format-time-string "%Y-%2m-%2d" (current-time))`  Adolfo
  cash     $1
  bank

  $0

ad: bank -> dining

When I dine out, sometimes I pay with my ATM card.

`(format-time-string "%Y-%m-%d" (current-time))` $1
  dining     $2
  bank

  $0

ag: bank -> groceries

When I buy groceries, sometimes I pay with my ATM card

`(format-time-string "%Y-%m-%d" (current-time))` $1
  groceries     $2
  bank

$0

ge: generic entry

In many other cases, I need to specify everything…

`(format-time-string "%Y-%m-%d" (current-time))` $1
  $2     $3
  $4

$0

web-mode

destroy: Destroy

This is useful in Rails views (you need a zurb_icon helper which makes a string into an icon).

<%= link_to zurb_icon('Destroy'), $0, method: :delete, data: { confirm: '$1' } %>