Skip to content

Instantly share code, notes, and snippets.

View johnbintz's full-sized avatar

John Bintz johnbintz

View GitHub Profile
@johnbintz
johnbintz / libicns-0.8.1-128px-png.patch
Created January 31, 2022 18:29
Patch for libicns 0.8.1 to add 128x128 PNG extraction support
diff -ruN libicns-0.8.1/src/icns_element.c libicns-0.8.1-modified/src/icns_element.c
--- libicns-0.8.1/src/icns_element.c 2012-06-13 19:42:06.000000000 -0400
+++ libicns-0.8.1-modified/src/icns_element.c 2022-01-31 08:07:50.871844474 -0500
@@ -565,6 +565,7 @@
switch(iconType)
{
case ICNS_1024x1024_32BIT_ARGB_DATA:
+ case ICNS_128x128_32BIT_ARGB_DATA:
case ICNS_256x256_32BIT_ARGB_DATA:
case ICNS_512x512_32BIT_ARGB_DATA:
@johnbintz
johnbintz / hello.c
Created January 1, 2022 03:10
hello.c
#include <stdio.h>
int main(int argc, char** args) {
printf("Hello world!");
return 0;
}
@johnbintz
johnbintz / keybase.md
Created October 5, 2018 15:07
keybase.md

Keybase proof

I hereby claim:

  • I am johnbintz on github.
  • I am johnbintz (https://keybase.io/johnbintz) on keybase.
  • I have a public key ASDiWYO6ih4lqd4TXhjqx5tDmR_54FfrB7nELTb7dWKiZQo

To claim this, I am signing this object:

@johnbintz
johnbintz / mp-select-mini-notes.md
Last active February 27, 2021 19:45
Monoprice Select Mini 3D Printer (and general 3D printing stuff) Notes

(all subject to change!)

Filaments tried

ProtoParadigm

  • PLA white, black, sapphire: Sapphire was tricky to get into Bowden tube at first, but once in, all three printed fine.
  • PLA summer colors: easy to use, cheap for a lot of different colors

Hatchbox

@johnbintz
johnbintz / slicer.scad
Last active September 16, 2016 11:23
How I sliced up the Caverna Storage Solution for the Monoprice Select Mini 3D
// set max print size here
slice_x = 80;
slice_y = 80;
slice_z = 80;
// use like this:
//
// for y in 0 1 2 3; do for x in 0 1 2 3; do openscad -o "bottom_${x}x${y}.stl" --render -D x=$x -D y=$y bottom_slicer.scad ; done; done
//
// you may need to mess with the orientation of the imported file/slicer cube!
@johnbintz
johnbintz / create-xml.clj
Created November 25, 2015 16:10
Go back to the early 2000s and make a DVD of videos!
#_(defdeps [[org.clojure/clojure "1.7.0"]
[org.clojure/data.xml "0.0.8"]])
(ns create-xml
(:require [clojure.string :as str])
(:use [clojure.data.xml]))
(def directory (clojure.java.io/file "."))
(defn get-extension [file]
@johnbintz
johnbintz / setup.sh
Created November 13, 2015 19:39
squid-deb-proxy for docker, because bandwidth is a thing
#!/bin/bash
docker run -it --name squid-deb-proxy-cache -v /var/cache/squid-deb-proxy busybox true
docker run -d --restart=always --name squid-deb-proxy --volumes-from squid-deb-proxy-cache -p 0.0.0.0:48000:8000 pmoust/squid-deb-proxy
@johnbintz
johnbintz / webpack-watch.js
Created September 15, 2015 22:50
Webpack + Babel with React Native Android, using react-native-webpack-server's internals
// this is a hack until react-native-webpack-server gets updated (and I'm
// sure it will soon. :) )
//
// you'll need 0.4.0-rc or better of react-native-webpack-server
// don't run react-native-webpack-server's server for now, use react-native's
//
// also, run me in pure node and not babel-node, or react-native will try and
// load polyfills that are already loaded. :/
var webpack = require('webpack');
var webpackConfig = require('./webpack.config.js');
@johnbintz
johnbintz / simple-capistrano-docker-deploy.rb
Last active April 3, 2023 08:23
Simple Capistrano deploy for a Docker-managed app
# be sure to comment out the require 'capistrano/deploy' line in your Capfile!
# config valid only for Capistrano 3.1
lock '3.2.1'
set :application, 'my-cool-application'
# the base docker repo reference
set :name, "johns-stuff/#{fetch(:application)}"
@johnbintz
johnbintz / join_kickstarter_exports.rb
Last active August 29, 2015 14:04
Join Kickstarter CSV files for shipping purposes
require 'csv'
fields_to_keep = [
"Backer Id", "Pledge Amount", "Shipping Name", "Shipping Address 1",
"Shipping Address 2", "Shipping City", "Shipping State", "Shipping Postal Code",
"Shipping Country Name"
]
sort_result_on = "Backer Id"