Skip to content

Instantly share code, notes, and snippets.

View joshluongo's full-sized avatar
👨‍💻

Josh Luongo joshluongo

👨‍💻
View GitHub Profile
@Jaybles
Jaybles / UIDeviceHardware.h
Created October 28, 2011 19:33
UIDeviceHardware - Determine iOS device being used
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;
@sfan5
sfan5 / cpbitmap2image.py
Created January 6, 2014 10:13
Tools to work with .cpbitmap files
#!/usr/bin/env python2
from PIL import Image
import sys
import struct
def r8(f):
return ord(f.read(1))
if len(sys.argv) <= 2:
print("Usage: %s <input> <output>" % sys.argv[0])
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 23, 2024 04:22
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

Install raspbian, set up your users however you would like, so long as you have sudo access on the user you are running this with. You probably want to resize the image so it fills the SD card as well.

  1. Copy this entire gist to your raspberry pi
  2. Do chmod +x step1.sh step2.sh iptables.sh in the gist folder (so that
  3. Run step1.sh a) This script does a few things - it first updates your raspberry pi, then it installs a few needed utilities, then it upgrades the firmware on your raspberry pi
@raym
raym / xyzprinting-da-vinci-1.0-calibration.md
Last active September 28, 2021 14:11
XYZprinting Da Vinci 1.0 Calibration

#TL;DR

- given that the "ideal" numbers are +255, +255, +255
- adjust screw A til #1 is close to +255
- adjust screw B til #2 & #3 are close to equal
  - this may require adjusting screw C if #2 or #3 start +ERR-ing
- adjust screw C til #2 & #3 are close to #1

@hjanuschka
hjanuschka / update_spark.sh
Created April 25, 2016 14:41
Fix UUID inside Spark inspector
#!/bin/bash
#get current xcode uuid
UUID=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID)
#update spark inspector uuid
defaults write ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/SparkInspectorXcodePlugin.xcplugin/Contents/Info.plist DVTPlugInCompatibilityUUIDs -array-add $UUID
@niahoo
niahoo / delete-all-messages.js
Last active September 20, 2023 01:29
Delete all messages in a Discord channel
(function(){
// Paste your token between the quotes :
var authToken = '________________________________________'
// https://github.com/yanatan16/nanoajax
!function(t,e){function n(t){return t&&e.XDomainRequest&&!/MSIE 1/.test(navigator.userAgent)?new XDomainRequest:e.XMLHttpRequest?new XMLHttpRequest:void 0}function o(t,e,n){t[e]=t[e]||n}var r=["responseType","withCredentials","timeout","onprogress"];t.ajax=function(t,a){function s(t,e){return function(){c||(a(void 0===f.status?t:f.status,0===f.status?"Error":f.response||f.responseText||e,f),c=!0)}}var u=t.headers||{},i=t.body,d=t.method||(i?"POST":"GET"),c=!1,f=n(t.cors);f.open(d,t.url,!0);var l=f.onload=s(200);f.onreadystatechange=function(){4===f.readyState&&l()},f.onerror=s(null,"Error"),f.ontimeout=s(null,"Timeout"),f.onabort=s(null,"Abort"),i&&(o(u,"X-Requested-With","XMLHttpRequest"),e.FormData&&i instanceof e.FormData||o(u,"Content-Type","application/x-www-form-urlencoded"));for(var p,m=0,v=r.length;v>m;m++)p=r[m],void 0!==t[p]&&(f[p]=t[p]);for
@steipete
steipete / ios-xcode-device-support.sh
Last active July 13, 2024 21:09
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
@mag911
mag911 / Parallel_Tools_fix_for_Ubuntu_19.04.md
Last active July 1, 2024 18:24
Parallel Tools fix for Ubuntu 20.04, 19.04, 19.10, 18.04

Update 25 April 2020:

Many thanks to @KZL1992 @tomslominski @ptrofi @n-thumann for recent comments on their experiences with 20.04 and Parallels 13/14/15, especially the subsitution of the latest prl-tools-lin.iso for older Parallels to get it going.


First off, credit goes to github.com/rudolfratusinski for leading the way here.

https://gist.github.com/rudolfratusinski/a4d9e3caff11a4d9d81d2e84abc9afbf