Skip to content

Instantly share code, notes, and snippets.

View rigelk's full-sized avatar

Rigel Kent rigelk

View GitHub Profile
@jehiah
jehiah / simple_args_parsing.sh
Created March 4, 2011 16:56
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
@soemarko
soemarko / theme.html
Created November 26, 2011 16:18
embed github gist to tumblr
<!-- Add the following lines to theme's html code right before </head> -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist">https://gist.github.com/1395926</div>
-->
@johntyree
johntyree / getBlockLists.sh
Last active March 9, 2024 12:32
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@areina
areina / emacs-email-setup.md
Created October 12, 2012 15:00
Manage your email in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
@bradfa
bradfa / gist:4397472
Created December 28, 2012 12:51
Bone Barebox
From barebox /next branch, as of 4ed7dad60bfbef20ef2de191c20f0a8da66bde56
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- am335x_beaglebone_mlo_large_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
$ cp MLO /media/F84E-1690/
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- am335x_beaglebone_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
$ cp barebox-flash-image /media/F84E-1960/barebox.bin
Boot output:
@mehcode
mehcode / install-pygtk.sh
Created August 7, 2013 09:49
Install pygtk inside of a virtualenv
# Ensure we're in a virtualenv.
if [ "$VIRTUAL_ENV" == "" ]
then
echo "ERROR: not in a virtual environment."
exit -1
fi
# Setup variables.
CACHE="/tmp/install-pygtk-$$"
@aktau
aktau / ffmpeg-interlace-test.sh
Last active October 28, 2023 14:26
ffmpeg detect interlacing
#!/bin/bash
# for a blogpost on this, check: http://www.aktau.be/2013/09/22/detecting-interlaced-video-with-ffmpeg/
# detect interlacing with the ffmpeg "idet" filter, the longer
# you let this run, the better, though it's never 100% accurate
# flags:
# -an = discard audio, we don't need it
# -f rawvideo = output raw video
@prwhite
prwhite / Makefile
Last active May 31, 2024 20:56
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
@alexclifford
alexclifford / add_sftp_user.sh
Last active May 25, 2018 15:26
Quick script for adding a new SFTP user/directory to an existing SFTP setup on Ubuntu.
#!/bin/sh
######################################################
# Create a new SFTP user and configure their chroot
######################################################
if [ $# -ne 2 ]; then
echo "Usage: add_sftp_user.sh username password"
exit 0
fi
#!/usr/bin/env bash
if [ $# -eq 0 ]; then
printf 1 "Usage: $(basename $0) [build-args [-- run-args [-- cmd-args] ] ]"
printf 1 " NOTE!!! the -rm-flag is hardcoded for build!"
fi
BUILD_ARG=()
RUN_ARG=()
CMD_ARG=()