Skip to content

Instantly share code, notes, and snippets.

View norpol's full-sized avatar

Phileas Lebada norpol

View GitHub Profile
@pigeonhill
pigeonhill / h3s.lua
Last active September 14, 2018 19:51
Hand Held Helper Script
--Hand Held Helper Script (H3S) Release 1.05
--[[
********************************************************************************************
This script attempts to capture 'the best' bracket sequences when hand holding.
Bracketing choices are Exposure or Focus.
In Focus mode the script creates a two image focus stack via aperture bracketing, and attempts to maintain the same exposure between two limits: the minimum handheld shutter and the maximum ISO.
The exposure bracketing mode is based on ISO shifting as well as time shifting.
The general strategy being to time shift from the highlights at the lowst ISO you can, and ISO shift from the shadows from the lowest Tv you can, at ISO 100. That is try and maximise photon capture, ie for the highest DR.
Note pushing ISO too far is pointless, as once above a critical level, Canon cameras go into ISO invariant zone (varies with camera) and overall DR falls with no increase in (read) noise.
@dlangille
dlangille / from var log messages
Created December 13, 2017 23:35
R710 after powering up the Dell TL4000 tape library
Dec 13 23:30:41 r710-01 kernel: sa2 at mps1 bus 0 scbus1 target 5 lun 0
Dec 13 23:30:41 r710-01 kernel: sa2: <IBM ULT3580-HH4 C7Q1> Removable Sequential Access SCSI-3 device
Dec 13 23:30:41 r710-01 kernel: sa2: Serial Number 1K10012996
Dec 13 23:30:41 r710-01 kernel: sa2: 300.000MB/s transfers
Dec 13 23:30:41 r710-01 kernel: sa2: Command Queueing enabled
Dec 13 23:30:41 r710-01 kernel: ch0 at mps1 bus 0 scbus1 target 5 lun 1
Dec 13 23:30:41 r710-01 kernel: ch0: <IBM 3573-TL B.60> Removable Changer SPC-3 SCSI device
Dec 13 23:30:41 r710-01 kernel: ch0: Serial Number 00X4U78G4272_LL0
Dec 13 23:30:41 r710-01 kernel: ch0: 300.000MB/s transfers
Dec 13 23:30:41 r710-01 kernel: ch0: Command Queueing enabled
@hinkman
hinkman / gist:456743a1ba4e82d11968f248ebec4402
Last active May 15, 2020 15:01
package.json dep of a dep
## Let's say we are commiting into "project_one". The file project_one/package.json
## for npm has a dependencies section that includes a dependent project - call it
## project_two. For instance:
project_one/package.json
------------------------
"dependencies": {
"cors": "2.7.*",
"docdash": "0.4.*",
@olejorgenb
olejorgenb / nix-package-search
Last active July 4, 2022 15:22
nix-package-search
@alexellis
alexellis / timelapse.md
Created March 9, 2017 08:48 — forked from porjo/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

@reox
reox / new_debian_kvm.sh
Last active March 31, 2018 20:17
Create a new Debian container for KVM and import it using virt-install
#!/bin/bash
set -e
# Name of the VM
IMAGE=some-fancy-name
# IP address for VM
IP="192.168.122.30"
MIRROR=http://mirror.hetzner.de/debian/packages
PACKAGES="openssh-server htop vim"
@leetschau
leetschau / docker-show-repo-tags.sh
Created September 26, 2016 08:45
list all tags of an image in docker hub
#!/bin/sh
# From: http://stackoverflow.com/a/34054903/701420
# Simple script that will display docker repository tags.
#
# Usage:
# $ docker-show-repo-tags.sh ubuntu centos
for Repo in $* ; do
curl -s -S "https://registry.hub.docker.com/v2/repositories/library/$Repo/tags/" | \
sed -e 's/,/,\n/g' -e 's/\[/\[\n/g' | \
grep '"name"' | \
@andrewlkho
andrewlkho / README.md
Created April 6, 2016 21:36
How to run sshd as a Tor hidden service on a Raspberry Pi

I keep a Raspberry Pi at a relative's house which backs up my cloud storage to a Time Machine on their network. Previously I had port 22 NAT'd to the Raspberry Pi so that I could ssh in for occasional admin. However, I found that even with iptables/fail2ban installed, there were daily attempts at getting hacked. As I only infrequently need to access the server, I decided to set up sshd as a Tor hidden service which did not require port 22 to be exposed to the wider internet.

Setup sshd as a hidden service

The first step is to install tor:

# apt-get install tor

Add the following lines to /etc/tor/torrc:

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@mhitza
mhitza / lvm_snapshots.md
Created March 24, 2016 01:39
LVM snapshots

LVM snapshots are logical volumes that reflect the state of the snapshoted volume at the exact moment in time the snapshot was created. Useful for backups and reference points we can revert back to.

Creating snapshots

$ sudo lvcreate --size 5G --snapshot --name root-backup /dev/vg0/root
  Logical volume "root-backup" created.