Skip to content

Instantly share code, notes, and snippets.


Paolo Priotto depoulo

View GitHub Profile
ingmarh / Dockerfile
Created May 14, 2020
CircleCI Build Artifacts server
View Dockerfile
# docker build -t circleci_build_artifacts .
# docker run -it -e CIRCLECI_TOKEN=token --init -p 8091:8091 --name circleci_build_artifacts -d circleci_build_artifacts
FROM hayd/alpine-deno:1.0.0

So you deleted a private key file and have no backup?

It happened to me in my first IT job. I was told to rm a couple of outdated keyfiles. Of course they weren't named in a human readable manner. And of course I tab-completed to the wrong directory...


Of course, there was no such thing as "undelete" on the linux-box in question.

ericclemmons /
Last active May 7, 2021
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

 <summary>Summary Goes Here</summary>
View type.js
function getType (value) {
let type = typeof value;
if (type === 'object') {
return value ?, -1) : 'null';
return type;
[NaN, 0, 1, Infinity, // numbers
null, undefined, false, 'str', // other primitives
alexproca / docker-machine-rename
Last active Nov 23, 2020
Rename docker-machine
View docker-machine-rename
#!/usr/bin/env bash
#copy this in a folder from path ex: /usr/local/bin
#usage: docker-machine-rename default my-default
# Authors
# alexproca initial script
# eurythmia sed magic
staltz /
Last active May 16, 2021
The introduction to Reactive Programming you've been missing
gnarf /
Last active Apr 11, 2021
git pr - Global .gitconfig aliases for Pull Request Managment


Either copy the aliases from the .gitconfig or run the commands in


Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
ronkorving / ios6-timers.js
Last active Dec 22, 2020
iOS6 webkit timer bug workaround
View ios6-timers.js
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise
// that it works, or that I will provide support (don't sue me).
// Author:
var timeouts = {};
hsablonniere /
Created May 2, 2012
scrollIntoViewIfNeeded 4 everyone!!!

scrollIntoViewIfNeeded 4 everyone!!!

This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded that can be called on DOM elements.


Just use the code in index.js in your app or website. You can see usage in the test page test.html.

The parent element will only scroll if the element being called is out of the view. The boolean can force the element to be centered in the scrolling area.