Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Rolling up to the function like a stretched out Steve Ballmer

Nick Pannuto sneakyness

💭
Rolling up to the function like a stretched out Steve Ballmer
View GitHub Profile
View streams.txt
LA
https://www.youtube.com/watch?v=iFBP0zpTj-o
Portland
https://www.periscope.tv/w/1djxXQVdeyNKZ
🦄
https://www.pscp.tv/w/1RDxlQzdEpdKL
Good gifs:
@sneakyness
sneakyness / togglePDFDarkMode.js
Created May 24, 2020
Chrome/Brave PDF Viewer Dark Mode Toggle
View togglePDFDarkMode.js
// When using in-browser PDF viewer, you can inspect it and run this in the console
// It's using CSS Blending to invert the colors of the PDF
function togglePDFDarkMode() {
var cover = document.createElement("div");
let inversion = `
position: fixed;
pointer-events: none;
top: 0;
left: 0;
width: 100vw;
@sneakyness
sneakyness / brightness.zsh
Created May 9, 2020
Macbook Pro Highest/Maximum Screen Backlight Brightness (Fast!) via Terminal command
View brightness.zsh
# on my MBP, this sets the screen backlight brightness to max much faster than any of the other working methods I've found
# nobody seems to demonstrate that you can send a stream of events when they show how this can be used
# might be 145 or similar on your hardware, try one at a time first:
# osascript -e 'tell application \"System Events\"' -e 'key code 144' -e ' end tell'
alias bri="osascript -e 'tell application \"System Events\"' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -
View updateSafeAreaForKeyboardFromNotification.swift
// Avoids the keyboard in a UIKit app by leveraging additionalSafeAreaInsets.
// You can put this in the root view controller so the whole app will avoid the keyboard.
// Only tested on iOS 13.3.
// Made for https://douglashill.co/reading-app/
@objc func updateSafeAreaForKeyboardFromNotification(_ notification: Notification) {
guard let endFrameInScreenCoords = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect else {
return
}
// Please consider whether the force unwrap here is safe for your own use case.
@sneakyness
sneakyness / UIColor+hexString.swift
Created Mar 9, 2020
Swift 5 UIColor+hexString - Accepts RGB/RRGGBB/RRGGBBAA
View UIColor+hexString.swift
import Foundation
import UIKit
extension UIColor {
convenience init(hexString: String) {
var hexString: String = hexString.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
if (hexString.hasPrefix("#")) {
hexString.removeFirst()
@sneakyness
sneakyness / Iconizer.sh
Last active Feb 22, 2020 — forked from richellis/Iconizer.sh
Create iOS application icons from one PDF file. Requires ImageMagick & GhostScript
View Iconizer.sh
#!/bin/zsh
#
#
# Iconizer shell script by Steve Richey (srichey@floatlearning.com)
# Modified by Rich Ellis (rich@richellis.net) based on contributions on Github from crishoj, giria
# Further modified by Nick Pannuto (sneakyness@sneakyness.com) based on gist comments from previous forks
# https://gist.github.com/steverichey/8493f3bd31ae71a9c933/forks
#
# Changelog:
@sneakyness
sneakyness / ApexLegendsHighPrioStart.reg
Created Feb 6, 2019
Download, save as .reg, run once. Will automatically start Apex Legends with high priority (cannot be done manually because of EAC). Gave me 10fps I didn't need, might help?
View ApexLegendsHighPrioStart.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\r5apex.exe\PerfOptions]
"CpuPriorityClass"=dword:00000003
View gist:1148c25c354473f29b0e2231c6c23924
https://drive.google.com/file/d/1jpezrG67IqvOB1zkW-x_3bVYxDdzUyO7/view?usp=sharing
https://drive.google.com/open?id=1gNRj9dU3D96oLWaLohCOV9fA-fX_khox
https://drive.google.com/file/d/1z6nnCjzvPDpyuhmc_m71o-wgA5svjsXm/view?usp=sharing
https://drive.google.com/file/d/1Q3nvBaZBxo_InPbIQwcKLcuaSbQAUMfr/view?usp=sharing
https://drive.google.com/open?id=1LSi6nPQx-SKP9EKmyaKNalFfcMWbZeGk
https://www.dropbox.com/s/je7rmhjmaiwxc2h/MAGPIE-OPZ.wav?dl=0
https://www.dropbox.com/s/a6dvjcs2rmsewyd/Plink%20Plink%20Physics.wav?dl=0
https://drive.google.com/file/d/1vFowB0qg4GKdEyg1q3KyJwFGq48qkD3i/view?usp=sharing
https://drive.google.com/file/d/1BI-rMIJ1ujT-9wOLAu2MvYOVhQvYOjh_/view?usp=drivesdk
https://drive.google.com/open?id=1l8FaWeQVSK7UdmOfATpLmjrxyVjERZvd
@sneakyness
sneakyness / nohzdive.skool
Created Dec 29, 2018
control map extracted by SkoolKit, need to play game completely to generate better one (ugh?!)
View nohzdive.skool
@start
@org
; Data block at 51739
b51739 DEFB 19,0,0,0
; Message at 51743
t51743 DEFM "NOHZDYVE "
; Data block at 51753
b51753 DEFB 253,0,10,0,253,0,23,255
@sneakyness
sneakyness / gist:866d3833daedf97807185f05d27105db
Created Dec 10, 2018
$ binwalk -I z_firmware_1_1_17.zfw
View gist:866d3833daedf97807185f05d27105db
$ binwalk -I z_firmware_1_1_17.zfw
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
5232 0x1470 BFF volume entry, AIXv3, file name: "[?p?RE?V???|???4??y????_?L??????3????S+?"
6158 0x180E Microsoft executable,
18438 0x4806 Microsoft executable,
28456 0x6F28 BFF volume entry, compressed, file size: 732700674, compressed size: -694175681, file name: "v?7pt???.'u?`?Wo@I??f n? H?o L?????ڎ?i3???M_X??-Eǘ?m?#?V?x\???B?s??hN?hS?p??nDe|D"
51223 0xC817 ARJ archive data, header size: 14854, version -113, minimum version to extract: 108, flags, multi-volume, , original name: "ۗH>??p???夏N????:?ᒂx??n?t(?????Pp-??\?ki?dZ&Q??}?L:M?z;:dJ4?s!?5?᥅6۹?4???Լ f???h5????9??y???\XA??", original file date: 1940-03-18 23:51:24, compressed file size: -339664082, uncompressed file size: -1482605033,
64125 0xFA7D VxWorks symbol table, little endian, first entry: