Skip to content

Instantly share code, notes, and snippets.

💻
Working from home

tripu tripu

View GitHub Profile
@tripu
tripu / docker-tags.sh
Created Mar 22, 2019
List or filter all tags for a given Docker image
View docker-tags.sh
#!/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 Feb 18, 2019
Git config file
View .gitconfig
[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 / vs-ext-to-md.md
Last active Jan 28, 2019
One-liner to dump all installed VS Code extensions as a Markdown list
View vs-ext-to-md.md

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 Dec 21, 2018
All public holidays in 2019 for Madrid city (Spain), in RTM format
View calendar-madrid-2019.txt
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):
@tripu
tripu / gh-graphql.md
Last active Oct 20, 2018
GH API v4 GraphQL snippets
View gh-graphql.md

👉 GH GraphQL API Explorer

My first comments on an issue, on a commit, and on a Gist

{
  viewer {
    issueComments(first: 1) {
      nodes {
        ...commonFields
@tripu
tripu / npm-check.txt
Last active Jan 22, 2018
w3c/spork vulnerabilities (after)
View npm-check.txt
$ npm-check
emailjs NOTUSED? Still using emailjs?
Depcheck did not find code similar to require('emailjs') or import from 'emailjs'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save emailjs
nopt NOTUSED? Still using nopt?
Depcheck did not find code similar to require('nopt') or import from 'nopt'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
@tripu
tripu / npm-check.txt
Last active Jan 22, 2018
w3c/spork vulnerabilities
View npm-check.txt
$ npm-check
urijs NOTUSED? Still using urijs?
Depcheck did not find code similar to require('urijs') or import from 'urijs'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save urijs
emailjs MAJOR UP Major update available. https://github.com/eleith/emailjs#readme
npm install --save emailjs@1.0.12 to go from 0.3.16 to 1.0.12
NOTUSED? Still using emailjs?
@tripu
tripu / ubuntu-artful-upgrade-troubleshooting.md
Created Jan 18, 2018
Ubuntu 17.10 "Artful Aardvark" upgrade troubleshooting
View ubuntu-artful-upgrade-troubleshooting.md

NB: beware of this bug!

Bug: gdm can't unlock desktop (after suspending, to switch users, etc)

Symptoms: lock screen takes very long (ie, a few seconds) to process username+password, returns “authentication error”, and becomes impossible to log in and unlock the screen again, with any user.

Also, /var/log/syslog shows:

Failed to add watch on /run/systemd/ask-password: No space left on device
@tripu
tripu / calendar-madrid-2018.txt
Last active Dec 26, 2017
All public holidays in 2018 for Madrid city (Spain), in RTM format
View calendar-madrid-2018.txt
Public holiday (Spain): Año Nuevo !1 #Spain #holiday #weekend ^1 Jan 2018
Public holiday (Spain): Epifanía del Señor !1 #Spain #holiday #weekend ^6 Jan 2018
Public holiday (Spain): Jueves Santo !1 #Spain #holiday #weekend ^29 Mar 2018
Public holiday (Spain): Viernes Santo !1 #Spain #holiday #weekend ^30 Mar 2018
Public holiday (Spain): Fiesta del Trabajo !1 #Spain #holiday ^1 May 2018
Public holiday (Madrid region): Fiesta de la CAM !1 #Spain #holiday #Madridregion ^2 May 2018
Public holiday (Madrid city): San Isidro Labrador !1 #Spain #holiday #Madridcity ^15 May 2018
Public holiday (Spain): Asunción de la Virgen !1 #Spain #holiday ^15 Aug 2018
Public holiday (Spain): Fiesta de la Hispanidad !1 #Spain #holiday #weekend ^12 Oct 2018
Public holiday (Spain):
You can’t perform that action at this time.