Skip to content

Instantly share code, notes, and snippets.

@dandosi
dandosi / sorthistorybyfield.sh
Last active December 6, 2021 19:09
sort using a field in the middle of the line, sort your history
# if you're looking for the last test you executed in December, BUT your history shows "the command number" first
# so, you have to sort by... The *Third field* 😊
# This avoids a problem if you've closed multiple shells, so the order of the commands in history is not chronological
history | grep gradlew | grep test | grep "12/" | sort -k 3
@dandosi
dandosi / snippet.md
Created April 24, 2017 19:13 — forked from andypotts/snippet.md
console.log() + var_dump() key bindings for Sublime Text

Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:

[
    { "keys": ["super+shift+l"],
      "command": "insert_snippet",
      "args": {
        "contents": "console.log(${1:}$SELECTION);${0}"
      }, "context":
 [