Skip to content

Instantly share code, notes, and snippets.

View depoulo's full-sized avatar

Paolo Priotto depoulo

View GitHub Profile
@ingmarh
ingmarh / Dockerfile
Last active August 4, 2025 08:43
GitHub Artifact Fetcher
# Example build and run:
# docker build -t github_artifact_fetcher .
# docker run -e "GITHUB_TOKEN=$(gh auth token)" -v /var/www/github-artifacts:/artifacts -p 3000:3000 --name github_artifact_fetcher github_artifact_fetcher
FROM node:alpine
RUN apk add --no-cache curl jq
ENV PORT=3000 DEST_DIR=/artifacts
WORKDIR /app
ADD server.mjs .
CMD ["node", "./server.mjs"]
EXPOSE $PORT
@kiding
kiding / NoScrollOnInputFocusiOSSafari.html
Last active September 24, 2025 00:52
Preventing iOS Safari scrolling when focusing on input elements
<!--
When an input element gets focused, iOS Safari tries to put it in the center by scrolling (and zooming.)
Zooming can be easily disabled using a meta tag, but the scrolling hasn't been quite easy.
The main quirk (I think) is that iOS Safari changes viewport when scrolling; i.e., toolbars shrink.
Since the viewport _should_ change, it thinks the input _will_ move, so it _should_ scroll, always.
Even times when it doesn't need to scroll—the input is fixed, all we need is the keyboard—
the window always scrolls _up and down_ resulting in some janky animation.
However, iOS Safari doesn't scroll when the input **has opacity of 0 or is completely clipped.**
@ingmarh
ingmarh / Dockerfile
Created May 14, 2020 12:10
CircleCI Build Artifacts server
# 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
ENV PORT 8091
EXPOSE $PORT
WORKDIR /app

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...

AAAAAAAAAAAAHHHH!!!

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

@ericclemmons
ericclemmons / example.md
Last active October 13, 2025 15:16
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!

<details>
 Summary Goes Here
@kirilloid
kirilloid / type.js
Last active July 29, 2022 19:42
getType
function getType (value) {
let type = typeof value;
if (type === 'object') {
return value ? Object.prototype.toString.call(value).slice(8, -1) : 'null';
}
return type;
}
[NaN, 0, 1, Infinity, // numbers
null, undefined, false, 'str', // other primitives
@alexproca
alexproca / docker-machine-rename
Last active January 6, 2025 20:05
Rename docker-machine
#!/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
staltz / introrx.md
Last active October 26, 2025 03:06
The introduction to Reactive Programming you've been missing
@gnarf
gnarf / ..git-pr.md
Last active June 20, 2025 11:04
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

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
ronkorving / ios6-timers.js
Last active March 9, 2022 03:40
iOS6 webkit timer bug workaround
(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: rkorving@wizcorp.jp
var timeouts = {};