Skip to content

Instantly share code, notes, and snippets.

View andykais's full-sized avatar

Andrew Kaiser andykais

View GitHub Profile
@andykais
andykais / remote_shutter.md
Created March 20, 2016 15:25
my tips for better remote shuttering
selector definition
DELAY how long to wait before first shot
LONG how long to shutter is open for
INTVL how long to wait between shots
N number of shots to take

Lock/Unlock

Press light + SET

@andykais
andykais / nightphototips.md
Last active February 7, 2016 16:23
astrophotography quick guide

Supplies Needed:

(essential are in bold)

  • Manual Control Camera (aperture, shutter, iso)
  • Lens (wider the better)
  • Tripod (heavier the better)
  • remote shutter

Setup

Location

Pick an area with as little light pollution as possible, including light you can see over the horizon from neighboring civilization.

@andykais
andykais / cocaine.sh
Created December 11, 2015 23:26
prevents ubuntu screen from shutting off
#!/bin/bash
case "$1" in
"on")
xset -dpms
xset s noblank
xset s off
;;
"off")

possible topics

humans are just a new balance to the ecosystem

  • we destabilize ecosystems
  • open areas for new growth
    • like phosphorous plankton
  • also talk about resources that we use that cannot be put back into the environment

will populating mars solve earths over population?

  • talk about our population's growing capacity
  • water found on mars
@andykais
andykais / zcomic.sh
Created October 2, 2015 16:29
save images as rar file, then rename as .cbr
#!/bin/bash
comicdir=$1
if [ -d "$comicdir" ]
then
outname=$(echo $comicdir | sed -e 's/\///')
outname=$(echo $outname | sed -e 's/\ /_/g')
@andykais
andykais / roc.sh
Last active May 18, 2016 17:37
autorun a command when a file is saved
#!/bin/sh
FORMAT=$(echo -e "\033[1;33m%w%f\033[0m written at $(date +'%r')")
clear
while true
do
clear\
&& echo "[Running \"$@\" on files changes in $(pwd) at $(date +'%r')]"\
&& echo ""\
&& echo "$@" > /home/andrew/bin/data/lastroc.sh\
&& bash /home/andrew/bin/data/lastroc.sh 0>/dev/null \
@andykais
andykais / dns_check.sh
Created August 26, 2015 02:00
check every hour if my dns manager has allowed github pages redirect, send a text message if it has
#!/bin/bash
#one hour (in seconds)
wait=$((60 * 60))
while true
do
dns=$(dig andykais.com +nostats +nocomments +nocmd)
if [[ $dns == *"github"* ]]
then
@andykais
andykais / moni.sh
Created August 22, 2015 16:43
used for setting up multiple monitors
#!/bin/bash
xrandr -q | grep 'connected' | awk '{print $1}' | while read line
do
if [ "$line" != "LVDS1" ]
then
xrandr --output $line --left-of LVDS1 --auto
fi
@andykais
andykais / slideshow.sh
Last active July 14, 2023 10:12
use feh to create a slideshow, meant for i3-wm, to be launched at startup
#!/bin/bash
#wait (in seconds) for background to change
wait=$((60 * 60))
#in the future, could load files from a general bin/config file
#sed -c -i "s/\($TARGET_KEY *= *\).*/\1$REPLACEMENT_VALUE/" $CONFIG_FILE
dir="$(cat /home/andrew/bin/data/slideshow_all.txt)"
#finds the image files in $dir, optionally can add --max-depth 1 to keep from searching subdirs
files=$(find "$dir" -regex ".*\.\(jpg\|gif\|png\|jpeg\)" | sort -n)
@andykais
andykais / .vimrc
Created July 8, 2015 15:28
get 256 color in gnome terminal
syntax enable
set background=dark
colorscheme solarized
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif