Skip to content

Instantly share code, notes, and snippets.

@tripu
tripu / download-bookmarks.md
Last active July 6, 2020 07:39
How to download a copy of all your bookmarks

Limitations

This is for a Unix shell (because of for, cut, wget, etc) and for Firefox (because FF exports bookmarks as JSON, where each entry has a uri property). YMMV.

Preparation

  1. Make sure you have wget installed
  2. Install jq
@tripu
tripu / nodejs-commands.md
Last active May 29, 2020 10:14
Commands for Node.js development and debugging
@tripu
tripu / calendar-madrid-2020.txt
Created December 14, 2019 16:14
All public holidays in 2020 for Madrid city (Spain), in RTM format
Public holiday (Spain): Año Nuevo !1 #Spain #holiday ^1 Jan 2020
Public holiday (Spain): Epifanía del Señor !1 #Spain #holiday #weekend ^6 Jan 2020
Public holiday (Spain): Jueves Santo !1 #Spain #holiday #weekend ^9 Apr 2020
Public holiday (Spain): Viernes Santo !1 #Spain #holiday #weekend ^10 Apr 2020
Public holiday (Spain): Fiesta del Trabajo !1 #Spain #holiday #weekend ^1 May 2020
Public holiday (Madrid region): Fiesta de la CAM !2 #Spain #holiday #Madridregion #weekend ^2 May 2020
Public holiday (Madrid city): San Isidro Labrador !1 #Spain #holiday #Madridcity #weekend ^15 May 2020
Public holiday (Spain): Asunción de la Virgen !2 #Spain #holiday #weekend ^15 Aug 2020
Public holiday (Spain): Fiesta de la Hispanidad !1 #Spain #holiday #weekend ^12 Oct 2020
Public holiday (Spain):
@tripu
tripu / japan-todo.md
Last active November 26, 2019 08:09
My Japanese to-do list
@tripu
tripu / docker-tags.sh
Created March 22, 2019 08:17
List or filter all tags for a given Docker image
#!/bin/sh
# All tags of Docker image "circleci/node" (raw JSON):
curl https://registry.hub.docker.com/v1/repositories/circleci/node/tags
# All images and their tags from CircleCI's own Docker registry (raw JSON):
curl https://circleci.com/docs/2.0/docker-image-tags.json
# All tags of Docker image "circleci/node", formatting JSON output:
curl https://registry.hub.docker.com/v1/repositories/circleci/node/tags | jq .
@tripu
tripu / .gitconfig
Last active February 18, 2019 09:00
Git config file
[alias]
ap = add -p
br = branch
cf = config
ci = commit
co = checkout
df = diff
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
pl = pull
ps = push
@tripu
tripu / .gitignore
Created February 18, 2019 08:55
Git ignore file
.vscode/
@tripu
tripu / vs-ext-to-md.md
Last active January 28, 2019 12:39
One-liner to dump all installed VS Code extensions as a Markdown list

This is a script I just wrote to share my installed extensions easily on this other Gist.

Example

user@host:~/whatever/dir$ (
>     for i in `ls ~/.vscode/extensions/ | rev | cut -d '-' -f 2- | rev`; do
>         NAME=$(cat ~/.vscode/extensions/$i*/package.json | jq .displayName | cut -d \" -f 2)
>         echo "* [$NAME](https://marketplace.visualstudio.com/items?itemName=$i)"
>     done
@tripu
tripu / calendar-madrid-2019.txt
Created December 21, 2018 20:55
All public holidays in 2019 for Madrid city (Spain), in RTM format
Public holiday (Spain): Año Nuevo !1 #Spain #holiday ^1 Jan 2019
Public holiday (Spain): Epifanía del Señor !1 #Spain #holiday #weekend ^7 Jan 2019
Public holiday (Spain): Jueves Santo !1 #Spain #holiday #weekend ^18 Apr 2019
Public holiday (Spain): Viernes Santo !1 #Spain #holiday #weekend ^19 Apr 2019
Public holiday (Spain): Fiesta del Trabajo !1 #Spain #holiday ^1 May 2019
Public holiday (Madrid region): Fiesta de la CAM !1 #Spain #holiday #Madridregion ^2 May 2019
Public holiday (Madrid city): San Isidro Labrador !1 #Spain #holiday #Madridcity ^15 May 2019
Public holiday (Spain): Asunción de la Virgen !1 #Spain #holiday ^15 Aug 2019
Public holiday (Spain): Fiesta de la Hispanidad !1 #Spain #holiday #weekend ^12 Oct 2019
Public holiday (Spain):