Skip to content

Instantly share code, notes, and snippets.

View pirafrank's full-sized avatar
🎯
Focusing

Francesco Pira pirafrank

🎯
Focusing
View GitHub Profile
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 4, 2024 00:53
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@olih
olih / jq-cheetsheet.md
Last active May 3, 2024 17:42
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

@BretFisher
BretFisher / docker-for-mac.md
Last active April 26, 2024 09:38
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


@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@swinton
swinton / README.md
Last active March 25, 2024 03:56
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.

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

@pudquick
pudquick / pipista.py
Created November 20, 2012 07:23
pipista - pip module (for installing other modules) for Pythonista
import os, os.path, sys, urllib2, requests
class PyPiError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def _chunk_report(bytes_so_far, chunk_size, total_size):
if (total_size != None):
@ssbarnea
ssbarnea / .profile
Created May 26, 2011 19:21
Bash script for setting up OS X for power users
alias dos2unix-recursive='find . -iname '*.tpl' | xargs dos2unix'
alias edit='mcedit'
alias del='rm'
alias deltree='rm -r'
alias dir='/bin/ls $LS_OPTIONS --format=vertical'
alias attrib='chmod'
alias chdir='cd'
alias copy='cp'
alias ls='ls -a'
@h2non
h2non / libvips-installer.sh
Last active October 3, 2023 20:07
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/*