Skip to content

Instantly share code, notes, and snippets.

View Harry-Harrison's full-sized avatar
🍄

Harry Harrison Harry-Harrison

🍄
View GitHub Profile
@brandondurham
brandondurham / install-app-icons.sh
Created December 10, 2021 21:05
Add custom icons to several apps at once.
#!/usr/bin/env bash
# You will need to update app names, paths to apps, and the location of the
# custom app icons. Also, each app includes a `has_copied` var, and each one
# should be 1 higher than the previous. Lastly, the conditional on line 32
# should be updated to match the value of the last `has_copied`. That will
# trigger a restart of the Dock to ensure the new icons are picked up.
#
# There is likely a MUCH smarter way to pull this off. I welcome
# recommendations and optimizations!
@zhuowei
zhuowei / unpackpdx.py
Last active January 2, 2024 10:43
Unpacks a .pdx/.pdz file from the PlayDate
import sys
import os
import zlib
with open(sys.argv[1], "rb") as infile:
indata = infile.read()
magic = b"Playdate PDX\0\0\0\0"
magic_new = b"Playdate PDZ\0\0\0\0"
if not indata[0:len(magic)] in [magic, magic_new]:
@jc-torresp
jc-torresp / raspberry-pi-plex-server.md
Last active April 23, 2024 14:29
Setup a Raspberry Pi Plex Media Server (Including external storage media and Windows to Raspbian migration)

Raspberry Pi Plex Server

Installation

Ensure our operating system is entirely up to date:

sudo apt-get update
sudo apt-get upgrade
// Shader created with Shader Forge v1.38
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:2,rntp:3,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:1,fgcg:1,fgcb:1,fgca:1,fgde:0.01,fgrn:5,fgrf:15,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:4904,x:33076,y:32617,varname:node_4904,prsc:2|diff-5996-OUT,clip-8651-A;n:type:ShaderForge.SFN_Color,id:848,x:32
@jbelke
jbelke / Mac OSX Setup - Brew
Last active May 2, 2024 05:45
Mac OSX Setup - Brew and Cask
# Get Sudo.
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
# Install Xcode first - https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
# Install Xcode command line tools.
xcode-select --install
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@martpie
martpie / keymap.cson
Last active October 7, 2021 09:41
Get emmet-atom working fine with Atom and autocomplete-plus
# Will make autocomplete trigger with 'enter' instead of 'tab'
'atom-text-editor:not(mini) .autocomplete-plus.autocomplete-suggestion-list':
'tab': 'unset!'
'enter': 'autocomplete-plus:confirm'
# Use 'expand-abbreviation' instead of 'expand-abbreviation-with-tab' for tab keybinding
'.pane .editor:not(.mini)':
'tab': 'emmet:expand-abbreviation'
@johanneslamers
johanneslamers / nginx.conf
Last active September 3, 2020 17:31
Craft CMS Nginx config for Laravel Forge with locale support
server {
listen 80 default_server;
server_name default;
root /home/forge/default/public;
# FORGE SSL (DO NOT REMOVE!)
# ssl on;
# ssl_certificate;
# ssl_certificate_key;
@nateware
nateware / make_favicon.sh
Last active April 8, 2024 05:48
Imagemagick to create favicon.ico with 16x16 and 32x32 sizes in it
# IE is still braindead so still use favicon.ico
convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 input.png output-16x16.ico
convert -resize x32 -gravity center -crop 32x32+0+0 -flatten -colors 256 input.png output-32x32.ico
convert output-16x16.ico output-32x32.ico favicon.ico
# Then, HTML needs to specify size="XxY" as largest size due to browser bugs
<link rel="shortcut icon" href="/favicon.ico" sizes="32x32">
@niw
niw / create_color_list.m
Created June 20, 2014 23:19
Create color list file (.clr) used for Apple color pallet, stored in ~/Library/Colors
#import <AppKit/AppKit.h>
int main(int argc, char *argv[])
{
@autoreleasepool {
NSColorList *colorList = [[NSColorList alloc] initWithName:@"Colors"];
if (argc < 2) {
printf("Usage: %s name:rrggbb,name:rrggbb,...\n", argv[0]);
return 0;
}