Skip to content

Instantly share code, notes, and snippets.

View Brainiarc7's full-sized avatar

Dennis E. Mungai Brainiarc7

View GitHub Profile
#!/bin/bash
sink_name="bluez_sink.00_42_1B_AD_FA_CE"
if [ -z "$1" ]; then
dbus-monitor --system "path=/org/bluez/777/hci0/dev_00_42_1B_AD_FA_CE, interface=org.bluez.AudioSink, member=Connected" | while read line; do
echo $line
$0 1
done
else

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

from osgeo import gdal
import os
layer_dict = {"reli":"reliability", "qual":"Quality", "ndvi":"NDVI", "evi":"EVI"}
def print_data(layer, data):
print data
print "data:", layer
print "type:", data.dtype
print "mean:", data.mean()
#!/bin/bash
#backup studio project files
#ignore build/ dir
SRC_DIR="/home/james/AndroidStudioProjects/"
DEST_DIR="/run/media/james/tank/Backups/studio/"
cd $SRC_DIR
@Brainiarc7
Brainiarc7 / PKGBUILD
Created August 17, 2014 00:23
Correct PKGBUILD for libeap on Arch Linux
pkgname=libeap
pkgver=1.5.1
pkgrel=2
pkgdesc="WiMAX EAP Library"
arch=('i686' 'x86_64')
url="http://linuxwimax.org"
license=('BSD')
depends=('openssl')
source=('http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.3-generate-libeap-peer.patch'
'http://hostap.epitest.fi/releases/wpa_supplicant-0.7.3.tar.gz')
@Brainiarc7
Brainiarc7 / flite-PKGBUILD
Created August 17, 2014 01:16
This gist contains a PKGBUILD for the flite package on Arch Linux. Fixed to prevent build errors on Arch.
# Maintainer: Dennis Mungai <dmngaie@gmail.com>
pkgname=flite
pkgver=1.9.0
pkgrel=1
pkgdesc="A lighweight speech synthesis engine (text to speech)"
arch=('i686' 'x86_64')
url="http://cmuflite.org"
license=('custom')
depends=('alsa-lib')
@Brainiarc7
Brainiarc7 / makepkg.conf
Created August 19, 2014 14:04
/etc/makepkg.conf sample tuned out
#
# /etc/makepkg.conf
#
#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
@Brainiarc7
Brainiarc7 / deis.yaml
Created August 21, 2014 07:35
Deploy a CoreOS cluster that tracks the Stable channel on Rackspace
heat_template_version: 2013-05-23
description: Deploy a CoreOS cluster that tracks the Stable Channel
parameters:
count:
description: Number of CoreOS machines to deploy
type: number
default: 3
constraints:
#!/usr/bin/env bash
# exit on first error
set -o errexit
readonly IMG="$1"
readonly GM_BINARY=/usr/local/bin/gm
readonly MV_BINARY=/bin/mv
readonly JPEGTRAN_BINARY=/usr/local/bin/jpegtran
@Brainiarc7
Brainiarc7 / Automated-Cloud-OpenELEC-Build-Script.sh
Created January 9, 2015 01:25
Automated script for OpenELRC builds on a VPC instance
#!/bin/bash
# Outer loop for build and image
while :
do
# Inner loop for git pull
while :
do
GIT=$(git pull)
echo $GIT
if [ "$GIT" = 'Already up-to-date.' ]