Skip to content

Instantly share code, notes, and snippets.

View TheNorthEestern's full-sized avatar

Kacy James TheNorthEestern

View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active April 22, 2024 21:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@saagarjha
saagarjha / imessage_cleanup.py
Created April 26, 2021 03:12
Helps clean up large iMessage attachments by letting you search for them
#!/usr/bin/env python3
import pathlib
import sqlite3
if __name__ == "__main__":
connection = sqlite3.connect(f"{pathlib.Path.home()}/Library/Messages/chat.db")
for (name, size, chat, date) in connection.execute("""
SELECT transfer_name, total_bytes, chat_message_join.chat_id, date
FROM message_attachment_join JOIN message ON message_attachment_join.message_id = message.ROWID
@ikhvorost
ikhvorost / LocalNetworkPrivacy.swift
Last active December 1, 2021 01:36
Checking Local Network Privacy access state for iOS 14
//
// LocalNetworkPrivacy
//
// Created by Iurii Khvorost <iurii.khvorost@gmail.com> on 2021/02/04.
// Copyright © 2021 Iurii Khvorost. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@ylegall
ylegall / SpiralLoop.kt
Created August 25, 2020 17:00
looping spiral animation in openRNDR
package org.ygl.openrndr.demos
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.color.rgb
import org.openrndr.draw.shadeStyle
import org.openrndr.extra.compositor.compose
import org.openrndr.extra.compositor.draw
import org.openrndr.extra.compositor.layer
import org.openrndr.ffmpeg.ScreenRecorder
@zmic
zmic / graphic2.py
Last active July 13, 2021 13:39
Snippet 2 : meltdown in the complex plane
import os
import numpy as np
from PIL import Image
#-------------------------------------------------------------------
#
# helper functions
#
def create_complex_plane(X, Y, x0, x1, y0, y1, endpoint=False):
I = np.indices((Y,X)).astype(np.float64)
@bened-h
bened-h / blender_game_of_life.py
Last active November 20, 2023 19:10
This script implements Convey's "Game of Life" in Blender 2.8.
# blender 2.8
"""
This script implements Convey's "Game of Life" in Blender 2.8
It relies on the blender file containing a mesh called "Cube"
(sidelength = 1) and an empty collection called "Grid".
"""
import bpy
from random import random
@u-ndefine
u-ndefine / 50_lines.pde
Last active April 25, 2024 12:07
Sketch of my generative art, "50 Lines"
float decel(float x) { // as an easing function
return 1-(x-1)*(x-1);
}
void setup() {
background(255);
size(750,750,P2D);
PImage img = loadImage("image.png");
strokeWeight(2);
noFill();
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@bencbartlett
bencbartlett / pulse.nb
Created October 6, 2019 21:34
Mathematica code for photon pulse animation
<< MaTeX`
SetOptions[MaTeX, "Preamble" -> {"\\usepackage{color,txfonts}"}];
SetDirectory[NotebookDirectory[]];
c = 1;
\[Alpha] = .7;
\[Beta] = .05;
k0 = 7;
\[Omega]0 = 2 c;
vg = c;
@matthewreagan
matthewreagan / Perlin
Last active March 30, 2024 16:18
Perlin noise generation in Swift
// Perlin.swift
// Created by Matthew Reagan on 8/7/18.
//
// Quick implementation of the the classic Perlin noise
// generation function, useful for creating organic textures
// or terrain. Perlin noise can also be easily generated with
// Apple's GameplayKit framework, this code is mostly for
// experimentation purposes. (Disclaimer: This code is not
// optimized, nor particularly elegant, but it can be used as
// a jumping off point for writing custom noise functions.)