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 October 24, 2024 21:03
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 November 5, 2024 11:24
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 / 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 / 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 [email protected])
  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 }}"
}
@stollcri
stollcri / docker_compose_ipdb.sh
Created January 6, 2017 14:44
Break the backend out of docker-compose, run it with service-ports (so we can ipdb), and install ipdb
#!/bin/sh
# alias engage_ipdb='(sleep 15; docker exec $(docker ps -f name=backend --format "{{.Names}}") pip install ipdb) & docker-compose stop backend && docker-compose rm -f backend && docker-compose run --service-ports backend'
(sleep 15; docker exec $(docker ps -f name=backend --format "{{.Names}}") pip install ipdb) & \
docker-compose stop backend && \
docker-compose rm -f backend && \
docker-compose run --service-ports backend
@stollcri
stollcri / watch_exim.sh
Last active September 8, 2016 00:02
Watch exam mail queue
watch sudo exim -bp | exiqsumm