Skip to content

Instantly share code, notes, and snippets.

View pirafrank's full-sized avatar
🎯
Focusing

Francesco Pira pirafrank

🎯
Focusing
View GitHub Profile
@swinton
swinton / README.md
Last active September 1, 2024 00:41
Automatically sign your commits from GitHub Actions, using the REST API

Verified commits made easy with GitHub Actions

image

So you want to commit changes generated by a GitHub Actions workflow back to your repo, and have that commit signed automatically?

Here's one way this is possible, using the REST API, the auto-generated GITHUB_TOKEN, and the GitHub CLI, gh, which is pre-installed on GitHub's hosted Actions runners.

You don't have to configure the git client, just add a step like the one below... Be sure to edit FILE_TO_COMMIT and DESTINATION_BRANCH to suit your needs.

@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active November 15, 2024 20:31
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@BretFisher
BretFisher / docker-for-mac.md
Last active November 8, 2024 13:45
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@olih
olih / jq-cheetsheet.md
Last active November 4, 2024 05:44
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@h2non
h2non / libvips-installer.sh
Last active July 25, 2024 03:38
libvips 7.42.x cross-platform simple installer script (supports OSX, Debian, Ubuntu, CentOS, Fedora, Amazon Linux)
#!/bin/sh
#
# Orinally made by Lovell Fuller for sharp
# https://github.com/lovell/sharp
#
# Usage:
# curl -s https://gist.githubusercontent.com/h2non/89bb2f87c6499d0b25f1/raw/bf3d0743107f02f5db2b93c53f7f0e07a1c33112/libvips-installer.sh | sudo bash -
#
@temoto
temoto / Dockerfile
Last active June 20, 2023 08:34
File layout template for project with multiple docker containers in single repo
# I will eat you family and your dog if you use FROM ubuntu for container that runs a service in production
# Reading: http://phusion.github.io/baseimage-docker/
FROM phusion/baseimage:0.9.15
# inspired by https://github.com/progrium/buildstep
RUN mkdir /build
ADD ./files-build/ /build/
RUN chmod --recursive go-rwx /build
RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive /bin/bash /build/prepare
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@aborruso
aborruso / 00_readme.md
Last active August 29, 2015 14:14
Un generatore di feed RSS per VeryBello

#Un generatore di feed RSS per VeryBello Ho creato un generatore di feed RSS per VeryBello, a partire dalla località di cui si vogliono elencare gli eventi. Niente da prendere troppo sul serio, e niente affatto perfetto.

E' fatto con Yahoo Pipes e ha questo URL di base: http://pipes.yahoo.com/pipes/pipe.run?_id=018841bdba2446faca1b9f1cae900f44&_render=rss&textinput1=Matera

Basta cambiare il nome città presente a fine URL e si avrà il feed relativo. Quindi per Palermo sarà http://pipes.yahoo.com/pipes/pipe.run?_id=018841bdba2446faca1b9f1cae900f44&_render=rss&textinput1=Palermo

Il feed RSS è un GeoRSS (con tutti i difetti dell'automazione di processo) e ci si fanno rapidamente mappe come quella di sotto.

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@mhartington
mhartington / CustomTheme
Last active December 8, 2018 20:35
If you want to make a custom theme for ionic, and are using scss, this is a base to get you started
//Custom Theme test
// Colors
// -------------------------------
$custom: #057b6c !default;
// Buttons
// -------------------------------
$button-custom-bg: $custom !default;
@hypersoft
hypersoft / globlines
Last active August 29, 2015 13:56
Path Tools
#!/bin/sh
pipe=cat;
ifilter=./ifilter; [ -e "$ifilter" ] || ifilter=ifilter;
if [ "${1:0:1}" == '-' ]; then
pipe="$ifilter $1";
shift;
fi;