Skip to content

Instantly share code, notes, and snippets.

View RobinDumontChaponet's full-sized avatar

Robin Dumont-Chaponet RobinDumontChaponet

View GitHub Profile
@pdarcey
pdarcey / SwiftData.md
Last active May 4, 2024 10:30
SwiftData storage on the Mac

SwiftData storage on the Mac

Where does SwiftData store things on the Mac?

Default Storage Location

On iOS, this directory is in the app's own storage location (app_UUID/Library/Application Support) but, on the Mac, it's a shared location in the user's Library.

By default on the Mac, SwiftData stores its model in the /~/Library/Application Support directory as default.store. (It will also add two other files, default.store-shm and default.store-wal, as the model is stored as a SQLite database, and these are these additional files are part of how SQLite works.)

@guillaumealgis
guillaumealgis / detect.sh
Last active November 12, 2023 09:52
Detect the latest ECMAScript version supported by JavascriptCore on macOS
#!/usr/bin/env sh
# Find the jsc REPL, and execute our detection code inside it.
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
JSC=$(find -H /System/Library/Frameworks/JavaScriptCore.framework -iname jsc)
if [ -z "$JSC" ]; then
echo "jsc binary not found" >&2
@krithin
krithin / raspberry-pi-install.md
Last active April 4, 2024 22:54
Jitsi Meet Server and Videobridge Installation on Raspberry Pi 4 with Ubuntu Server 21.04

Jitsi Meet install on a Raspberry Pi 4 with Ubuntu Server 21.04

This guide helps you host your own Jitsi server on a Raspberry Pi 4B. It is adapted from Jitsi's quick install guide and the Jitsi on ARM guide written by crouchingtigerhiddenadam. The biggest difference is this is designed to work with a Pi running Ubuntu Server 21.04 instead of Raspbian.

I did this because I'd rather set up Jitsi Meet on a Raspberry Pi I already own than add a dedicated VPS (and pay AWS's bandwidth costs) just for that. I used Ubuntu 21.04 because I'm more familiar with Ubuntu than with Raspbian, and using an arm64 OS makes the setup easier than on armhf. I also tried to use distribution packages instead of manually downloading individual deb files throughout.

Prerequisites

This guide assumes you already have a DNS name set up with an A record pointing

@ericwbailey
ericwbailey / file-types.css
Last active December 8, 2020 07:03
#writing #css-tricks
/*
* Archives
* A compressed collection of data.
*/
a[href$=".7z"],
a[href$=".cab"],
a[href$=".gz"],
a[href$=".lzh"],
a[href$=".rar"],
a[href$=".tar"],
@jeantil
jeantil / algorithm.sql
Last active May 26, 2020 20:37
Code source d’Admission post-bac
--
-- le code ci-dessous a a été fortement amélioré par un effor collaboratif sur
-- https://github.com/jeantil/admission_post_bac
-- Pull requests, issues et contributions wiki sont les bienvenues.
-- Une partie du code a été rétro analysé a partir de diverses sources cf https://github.com/jeantil/admission_post_bac/wiki
--
FUNCTION gen class alea V1 relatif grp(
o_g_ea_cod_ins IN VARCHAR2,
o_g_ti_cod IN NUMBER,
@Benoitlecorre
Benoitlecorre / algo_apb_proper.sql
Last active June 16, 2020 12:09
Code source d'Admission post-bac envoyé par le ministère de l'Education nationale
-- Génération automatique de classements aléatoires en production, pour les FNS
-- ===================================
FUNCTION gen_class_aiea_v1_relatif_grp( o_g_ea_cod_ins IN varchar2, o_g_ti_cod IN number, o_c_gp_cod IN number, o_g_tg_cod IN number, iogin IN varchar2, type_login IN number, mode_dev IN number, confirm IN number, saio IN number, nip IN varchar2, indic IN number, mess_err out varchar2, mess_aff out varchar2)
RETURN number IS
retour number;
X varchar2(2);
dummy number;
dummy2 number;
l_c_gp_fIg_seI c_grp.c_gp_flg_sel%type;
@xorrior
xorrior / wmic_cmds.txt
Last active May 12, 2024 13:32
Useful Wmic queries for host and domain enumeration
Host Enumeration:
--- OS Specifics ---
wmic os LIST Full (* To obtain the OS Name, use the "caption" property)
wmic computersystem LIST full
--- Anti-Virus ---
wmic /namespace:\\root\securitycenter2 path antivirusproduct
@mattshepherd
mattshepherd / apple help book example.txt
Last active November 3, 2022 13:32
To support the table of contents button in the OS X Help Book app you need to implement the following code. This isn't documented anywhere but I found it in Apple's own help files and tested it to work. I believe it only works in the more recent versions of OS X, so you if your app supports really old versions you might want to check it.
//disable TOC button
window.HelpViewer.showTOCButton(false);
//enable TOC button
//If you call this on window load it will flash active for a brief second and then disable again.
//Call if after a delay of 250ms and is works fine
//Not sure what the second variable does yet, but passing false works fine
window.HelpViewer.showTOCButton( true, false, function() {
//do something to toggle TOC in your webpage
});
@waynegraham
waynegraham / console.js
Last active October 16, 2022 19:03
print console.log output to a debug div (for mobile)
if (typeof console != "undefined")
if (typeof console.log != 'undefined')
console.olog = console.log;
else
console.olog = function() {};
console.log = function(message) {
console.olog(message);
$('#debugDiv').append('<p>' + message + '</p>');
};