Skip to content

Instantly share code, notes, and snippets.

@airy10
airy10 / airtag-decryptor.swift
Last active May 6, 2024 11:00
Decrypt all beacons files from ~/Library/com.apple.icloud.searchpartyd
//
// airtag-decryptor.swift
//
// Decrypt all beacons files from ~/Library/com.apple.icloud.searchpartyd - updated when FindMy is running
// Results in /tmp/com.apple.icloud.searchpartyd - same file hierarchy
//
// Created by Matus on 28/01/2024. - https://gist.github.com/YeapGuy/f473de53c2a4e8978bc63217359ca1e4
// Modified by Airy
//
import Cocoa
@danleavitt0
danleavitt0 / index.js
Last active May 6, 2024 10:59
default
var {loop, move, motor, read, sleep, out} = require('robot-loop')
loop(main /*,ip address*/)
var steer = move()
function main (input) {
if (input === 'forward') {
forward()
} else if (input === 'back') {
back()
@ericoporto
ericoporto / 1.Instructions.md
Created October 19, 2020 02:10 — forked from WesThorburn/1.Instructions.md
Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Download and Install Emscripten

  • My preferred installation location is /home/user
  • Get the latest sdk: git clone https://github.com/emscripten-core/emsdk.git
  • Enter the cloned directory: cd emsdk
  • Install the lastest sdk tools: ./emsdk install latest
  • Activate the latest sdk tools: ./emsdk activate latest
  • Activate path variables: source ./emsdk_env.sh
  • Configure emsdk in your bash profile by running: echo 'source "/home/user/emsdk/emsdk_env.sh"' >> $HOME/.bash_profile
@mxriverlynn
mxriverlynn / defaults.js
Created August 22, 2012 02:11
defaults
// backbone's `defaults` can be a function.
//
// if you need the default value to be evaluated
// every time you instantiate a new model, then
// it should be a function, not an object literal.
//
// object literals are only evaluated once, when the
// object is defined.
{
"scripts": [],
"styles": []
}
@xavaz
xavaz / default.html
Last active May 6, 2024 10:58
default
lol --
@SenZmaKi
SenZmaKi / imageCompressorWorker.ts
Last active May 6, 2024 10:58
When dealing with numerous high-resolution large file size images in Chromium, you might encounter janky scrolling or other issues since rendering the images blocks the main thread (UI thread). To address this issue, we use a canvas to compress the images first. To avoid blocking the main thread during compression, we perform the compression in …
import type {
CompressorWorkerDTO,
CompressorWorkerResponseDTO,
CompressorWorkerParams,
} from "./types.ts";
// Define behavior for the web worker
self.onmessage = async (msg: { data: CompressorWorkerDTO }) => {
const { bitmap, params } = msg.data;
const { width, height, format, url, quality } = params;
@YeapGuy
YeapGuy / airtag-decryptor.swift
Last active May 6, 2024 10:57
Decrypt macOS Find My .record file
//
// airtag-decryptor.swift
//
//
// Created by Matus on 28/01/2024.
//
import Foundation
import CryptoKit
// Function to decrypt using AES-GCM
@FeralFlora
FeralFlora / 01 Zotero Integration import template and more!.md
Last active May 6, 2024 10:57
Zotero import template for the Zotero integration plugin for Obsidian. Screenshots and usage guide over in the Obsidian forum here (somewhat outdated guide): https://forum.obsidian.md/t/zotero-integration-import-templates/36310/105?u=feralflora
  • ZI-main.md
    • The main Zotero Integration template
  • runImport.md
    • Template that enables updating literature notes at the click of a button, and much more.
  • Meta bind button template
    • Template for in-note button that executes runImport.md
@domenic
domenic / default-export.md
Last active May 6, 2024 10:56
Default default export = MIO?

Intro

Idea: could we make the "default default export" the module instance object?

So for:

// a.js
export const x = 1;
export const y = 2;