Skip to content

Instantly share code, notes, and snippets.

View realchrisolin's full-sized avatar

Chris Olin realchrisolin

View GitHub Profile
@realchrisolin
realchrisolin / monitor.sh
Last active December 31, 2015 20:58 — forked from vjt/monitor.sh
#!/bin/bash
#
# Starts a multiplexed terminal session with tmux running monitoring software.
# Requires grc, top, and set_pane (the latter of which is another one of my gists).
# Based off https://gist.github.com/vjt/1893884
#
# tmux 1.7 or later recommended.
#
name=monitor
@realchrisolin
realchrisolin / set_pane
Created March 28, 2014 04:35
set pane title, requires tput. stolen from http://stackoverflow.com/a/9757133
#!/bin/sh
# usage: no_scroll_line top|bottom 'non-scrolling line content' command to run with args
#
# Set up a non-scrolling line at the top (or the bottom) of the
# terminal, write the given text into it, then (in the scrolling
# region) run the given command with its arguments. When the
# command has finished, pause with a prompt and reset the
# scrolling region.
@realchrisolin
realchrisolin / get_freemem
Created March 28, 2014 04:39
greps /proc/meminfo to return amount of free memory
#!/bin/bash
getfree=`grep MemFree /proc/meminfo | awk '{print $2}'`
showfree=$(($getfree / 1024))
echo $showfree
#!/bin/bash
NYAN=('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbmbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmb'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmb'
@realchrisolin
realchrisolin / ssh-copy-id
Created June 5, 2014 02:50
automagically copies ssh public key to remote server. stolen from ubuntu.
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/id_rsa.pub"
if [ "-i" = "$1" ]; then
@realchrisolin
realchrisolin / muviconv.sh
Last active August 29, 2015 14:04
h264 to dnxhd
# Simple script to convert all .MOV files (like the ones generated by a Veho Muvi) to an acceptable codec that can be used with Cinelerra
for i in *.MOV; do avconv -i $i -y -vcodec dnxhd -b 145M -mbd rd -r 59.94 -acodec copy -threads 6 ${i%.MOV}-DNxHD.mov; done
# Simple shell script to quickly generate a list of 12 character temp passwords that I've been using for years
#!/bin/bash
head -c 500 /dev/urandom | tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?='|fold -w 12| head -n 8| grep -i '[!@#$%^&*()_+{}|:<>?=]'

Keybase proof

I hereby claim:

  • I am realchrisolin on github.
  • I am realchrisolin (https://keybase.io/realchrisolin) on keybase.
  • I have a public key ASAqS4-KdIf-imhFXtO8AQwsM9ZBQwHW3kKvOKKrEBq2BAo

To claim this, I am signing this object:

#!/bin/bash -x
#This script is a simple bash script that checks the directory (and subdirectories) that it is
#run in and tries converting any ISO images to H.264 videos using Handbrake. You will need
#dirname installed on your machine along with HandBrakeCLI.
#
#WARNING: It WILL change the extensions of your .iso images to .osi. Comment the second to last
#line in the script if you do not want this to happen.
#
#Be sure to edit the script and change "/path/to/converted_movies" to whatever directory you
@realchrisolin
realchrisolin / Dockerfile
Created March 25, 2017 05:05
Generic Ubuntu dev environment Dockerfile
# Use Xenial as a base image
FROM ubuntu:16.04
# Fix ReadLine warnings
ENV TERM linux
# Install apt based dependencies required to run Rails as
# well as RubyGems. As the Ruby image itself is based on a
# Debian image, we use apt-get to install those.