Skip to content

Instantly share code, notes, and snippets.

View michaelpass's full-sized avatar

Michael Pass michaelpass

  • (Former) Iowa Formula Racing
  • Iowa City, IA
  • X @mik3pass
View GitHub Profile
@michaelpass
michaelpass / LovelyScript.sh
Last active April 6, 2019 06:49
Deduplicae $PATH in .rc file
# _
# _______| |__ _ __ ___
# |_ / __| '_ \| '__/ __|
# _ / /\__ \ | | | | | (__
# (_)___|___/_| |_|_| \___|
# Deduplicate path variables
get_var () {
eval 'printf "%s\n" "${'"$1"'}"'
@keysie
keysie / steps
Last active August 31, 2019 07:35
EAGLE change package of multiple parts at once
1. Select all the components you want to change as a group
2. run "CHANGE PACKAGE '<PACKAGE-NAME>'"
3. right click somewhere and select "CHANGE GROUP"
@yuchuanfeng
yuchuanfeng / impbcopy.m
Created May 8, 2018 04:49 — forked from mwender/impbcopy.m
Command line copy an image file to the clipboard in Mac OS X. See first comment for install instructions.
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import <unistd.h>
BOOL copy_to_clipboard(NSString *path)
{
// http://stackoverflow.com/questions/2681630/how-to-read-png-image-to-nsimage
NSImage * image;
if([path isEqualToString:@"-"])
{
// http://caiustheory.com/read-standard-input-using-objective-c

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@mwender
mwender / impbcopy.m
Last active June 20, 2024 09:20
Command line copy an image file to the clipboard in Mac OS X. See first comment for install instructions.
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import <unistd.h>
BOOL copy_to_clipboard(NSString *path)
{
// http://stackoverflow.com/questions/2681630/how-to-read-png-image-to-nsimage
NSImage * image;
if([path isEqualToString:@"-"])
{
// http://caiustheory.com/read-standard-input-using-objective-c