Skip to content

Instantly share code, notes, and snippets.

View stollcri's full-sized avatar

Christopher Stoll stollcri

View GitHub Profile
@stollcri
stollcri / c41
Last active April 30, 2024 18:13
A Python script to develop scans of C-41 film negatives into color-corrected positive images
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import logging
import math
import os
import statistics
import signal
import sys
@stollcri
stollcri / c41lab
Last active March 19, 2024 19:31
A script which uses ImageMagick to develop scans of C-41 film negatives into color-corrected positive images
#!/bin/bash
# ====================================================================================================================
#
# Converted for bash by @stollcri (stollcri at gmail dot com), 2020-07-28
#
# Originally downloaded from: https://sites.google.com/site/c41digitallab/the-complexity
#
# ====================================================================================================================
# C41LAB - Version 1.2
#
@stollcri
stollcri / chrome_HSTS_clear.md
Last active January 4, 2024 05:09
Clear 307 HSTS redirects in Google Chrome

To clear 307 HSTS redirects in Google Chrome (if you experimenting with SSL -- you probably wouldn't want to do this for a site that you do not opperate, since it is there to protect you), go to the following URL and delete the site.

chrome://net-internals/#hsts

@stollcri
stollcri / tmux.sh
Last active April 25, 2020 10:38
tmux cheatsheet
# Start new session with name
tmux new -s SESSION_NAME
# Split into 2 side by side panes
<Ctrl>-b %
# Split into 2 top over bottom
<Ctrl>-b "
# Switch pane (left)
<Ctrl>-b <Left>

Keybase proof

I hereby claim:

  • I am stollcri on github.
  • I am stollcri (https://keybase.io/stollcri) on keybase.
  • I have a public key whose fingerprint is 196B 3B6F 2F7E 5E99 D713 5595 20F0 4DD1 8597 970F

To claim this, I am signing this object:

@stollcri
stollcri / ReplayKitExample.m
Last active May 9, 2018 18:11
Created a "Single View Application" project and added ReplayKit code to the ViewController files
//
// ViewController.h
// ReplayKitExample
//
// Created by Christopher Stoll on 6/11/15.
// Copyright © 2015 Christopher Stoll. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <ReplayKit/ReplayKit.h>
@stollcri
stollcri / generate_related_pages.py
Last active April 22, 2018 13:43
Generate Related Posts for Jekyll Using LSI
@stollcri
stollcri / batch_create_iconsets.md
Last active November 24, 2017 15:24
Create a lot of Xcode iconset images at once
  1. Create a directory named ORIGINAL with the originals (all named NAME@3x.png)
  2. Right-click on the directory and select "Duplicate"
  3. Rename the new directory to ORIGINAL@2x
  4. Go into the directory, select all
  5. Right-click on the selected files and select "Rename N Items..."
  6. Choose "Add Text", enter @2x, choose "after name", and click rename
  7. With all still selected, right-click and choose "Open With > Preview"
  8. In Preview, select all
  9. Use "Tools" > "Adjust Size..."
  10. Adjust size and resolution
#!/bin/bash
if [ -z "$1" ]; then
echo "Syntax: $0 [domain_file]"
echo " domain file contians each domain on a single line"
exit
fi
while read line; do
has_ssl=`nmap -p 443 $line | grep 443/tcp | awk '{print $2}'`
# .docker/config.json
# 80 column loayouts
{
"psFormat": "{{ printf \"%s %32.32s:%-12.12s %-21.21s\" .ID .Names .Ports .Status }}",
"imagesFormat": "{{ $length := len .Repository }}{{ if gt $length 42 }}{{ $namelen := len (index (split .Repository \"/\") 1) }}{{ if gt $namelen 25 }}{{ $repo := printf \"...%.39s\" (index (split .Repository \"/\") 1) }}{{ printf \"%s %9.9s %42s:%-12.12s\" .ID .CreatedSince $repo .Tag }}{{ else }}{{ $repo := printf \"%14.14s...%25.25s\" (index (split .Repository \"/\") 0) (index (split .Repository \"/\") 1) }}{{ printf \"%s %9.9s %42s:%-12.12s\" .ID .CreatedSince $repo .Tag }}{{ end }}{{ else }}{{ printf \"%s %9.9s %42s:%-12.12s\" .ID .CreatedSince .Repository .Tag }}{{ end }}"
}