Skip to content

Instantly share code, notes, and snippets.

View pdonadeo's full-sized avatar

Paolo Donadeo pdonadeo

View GitHub Profile
@JavierCane
JavierCane / listGoogleDriveSharedDocuments.js
Last active February 21, 2024 11:54 — forked from woodwardtw/tellmeyoursecrets.js
Google Spreadsheet script that lists all the shared documents inside a specified folder and all its subfolders recursively. Skips out the documents shared internally (with specified email addresses)
function start() {
const sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(["Name", "Sharing Access", "Sharing Permission", "Get Editors", "Get Viewers", "Date", "Size", "URL", "Download", "Description", "Type"]);
const folder = DriveApp.getFolderById("folder_id_copied_from_the_url_without_the_google_drive_domain");
recursiveListSharedFiles(folder, sheet);
}
function recursiveListSharedFiles(folder, sheet) {
@felixkrohn
felixkrohn / Readme.md
Last active December 3, 2022 18:10
centos8 @ OVH/SoYouStart/Kimsufi

centos8 @ OVH/SoYouStart/Kimsufi

How to install CentOS 8 on OVH/SoYouStart/Kimsufi

  • connect to the OVH/SoYouStart/Kimsufi API and create a ipxe script under https://eu.api.kimsufi.com/console/#/me/ipxeScript#POST or equivalent, see centos8.ipxe below
  • boot your server from this netboot, and ping it to follow the process. If you can observe the webserver's logs you will se your server's IP pulling kernel and initrd with "iPXE" user agent, then it will start pinging, and retrieve the kickstart.cfg a bit later (with "curl" user agent). This is the moment when you could set your server back to "Boot from Hard Disk".
  • Also at this point you can connect to your server with SSH using the key/password set in the kickstart file. type tmux a to attach the install's tmux session and follow the progress. For debugging, check the logs in /tmp and those sent over syslog.

upstream documentation

@abn
abn / slugify.postgres.sql
Last active May 29, 2024 13:44
A slugify function for postgres
-- original source: https://medium.com/adhawk-engineering/using-postgresql-to-generate-slugs-5ec9dd759e88
-- https://www.postgresql.org/docs/9.6/unaccent.html
CREATE EXTENSION IF NOT EXISTS unaccent;
-- create the function in the public schema
CREATE OR REPLACE FUNCTION public.slugify(
v TEXT
) RETURNS TEXT
LANGUAGE plpgsql
@yawaramin
yawaramin / sig
Last active June 12, 2022 05:03
Bourne Shell script to print out Merlin's inferred signature of an OCaml file (module)
#!/usr/bin/env sh
# Works with merlin version 2.5.4. Using protocol described at
# https://github.com/ocaml/merlin/blob/master/doc/dev/OLD-PROTOCOL.md#type-checking
usage ()
{
echo Usage: either of the following will work:
echo
echo ' sig module.ml'
@VerosK
VerosK / centos_bstick.sh
Created August 22, 2017 12:06 — forked from vkanevska/centos_bstick.sh
Custom CentOS 7 bootable ISO / Support UEFI & Secure boot
#!/bin/bash
# create custom bootable iso for CentOS 7 with kickstart
if [ $# -lt 2 ]
then
echo "Usage1: $0 path2iso path2kickstart"
exit 1
else
if [ ! -f $1 ]
then
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active July 23, 2024 14:54
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@bardo
bardo / README.md
Last active January 5, 2022 01:54
Watch a web page for edits with IFTTT and urlwatch

This setup allows to trigger an IFTTT event whenever a web page changes. It uses the urlwatch utility and the IFTTT Maker Channel.

Instructions:

  • Sign up to IFTTT.
  • Connect IFTTT's Maker Channel, and take note of your Maker key.
  • Create a new Recipe that takes the Maker Channel as input and outputs wherever you want. I used IF Notifications with the IF Android app, so that I get a notification on my phone whenever the trigger runs. The script passes the updated URL to IFTTT as value1, and my notification contains URL updated: {{Value1}}, so that I know which of the web pages has been updated.
  • On the machine that will check the website for changes install urlwatch and python2-requests.
  • Echo the URLs to check to ~/.urlwatch/urls.txt, one per line.
  • Then, copy over my hooks.py to ~/.urlwatch/libs/hooks.py adding the URLs to the ifttt_urls tuple and substituting YOUR_TRIGGER_NAME and YOUR_MAKER_KEY.
@Grokzen
Grokzen / Symmetrical ManyToMany Filter Horizontal in Django Admin.py
Last active March 12, 2024 17:55
Symmetrical ManyToMany Filter Horizontal in Django Admin
# Based on post from: https://snipt.net/chrisdpratt/symmetrical-manytomany-filter-horizontal-in-django-admin/#L-26
# Only reposting to avoid loosing it.
"""
When adding a many-to-many (m2m) relationship in Django, you can use a nice filter-style multiple select widget to manage entries. However, Django only lets you edit the m2m relationship this way on the forward model. The only built-in method in Django to edit the reverse relationship in the admin is through an InlineModelAdmin.
Below is an example of how to create a filtered multiple select for the reverse relationship, so that editing entries is as easy as in the forward direction.
IMPORTANT: I have no idea for what exact versions of Django this will work for, is compatible with or was intended for.
@jasonwhite
jasonwhite / pulsetest.cc
Last active July 3, 2024 06:04
A simple PulseAudio test program for monitoring volume changes on the default sound sink.
/**
* Author: Jason White
* License: Public Domain
*
* Description:
* This is a simple test program to hook into PulseAudio volume change
* notifications. It was created for the possibility of having an automatically
* updating volume widget in a tiling window manager status bar.
*
* Compiling:
@pad92
pad92 / iitc-plugin-ingressKML-exporter.user.js
Last active July 19, 2020 21:59
IITC plugin: Ingress KML Exporter
// ==UserScript==
// @id iitc-plugin-CSV@pad
// @name IITC plugin: Ingress KML Exporter
// @category Keys
// @version 1.0.20150105.03
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL https://git.depad.fr/ingress-res/iitc-plugins/raw/master/pad-plugin-ingressKML-exporter.user.js
// @downloadURL https://git.depad.fr/ingress-res/iitc-plugins/raw/master/pad-plugin-ingressKML-exporter.user.js
// @description Exports portals currently in view for use with Google Map ( KML Format ).
// @include https://www.ingress.com/intel*