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
#!/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
#!/bin/bash
# Dirty script to build Unity under ArchLinux
# Thanks for PKGBUILDs, chenxiaolong!
# Valdos Sine <fat0troll at riseup dot net> 2012
# Pratik Sinha <pratik at humbug dot in> 2012
echo "Run it in directory which will be build root ;)"
echo "Make sure you're have sudo without password or you will stuck in every package installation"
echo "GO!"
sudo pacman -Sy
#! /bin/bash
# Upgrade
sudo aptitude update
sudo aptitude full-upgrade -y
# Install CUDA
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_6.5-14_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb
sudo aptitude update
@Brainiarc7
Brainiarc7 / encoding-video.md
Created October 24, 2015 16:08 — forked from Vestride/encoding-video.md
Encoding Video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aacc --with-opus
@Brainiarc7
Brainiarc7 / pbis_centos7.txt
Created November 4, 2015 08:15 — forked from vikas027/pbis_centos7.txt
Fix PowerBroker Identity Service (formerly Likewise) on CentOS 7
PBIS (PowerBroker Identity Service) throws some errors while installing v8.2.2 (latest as of 25 June 2015) rpm.
[root@centos7 ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
[root@centos7 ~]# ./pbis-open-8.2.2.2993.linux.x86_64.rpm.sh install (This is filtered output)
...
...
Error: /usr/bin/systemctl enable /etc/pbis/redhat/lwsmd.service returned 1
Failed to issue method call: Unit /etc/pbis/redhat/lwsmd.service does not exist.
@Brainiarc7
Brainiarc7 / PKGBUILD
Created November 30, 2015 17:59 — forked from silverhammermba/PKGBUILD
Synaptics Palm Detection patch
# $Id: PKGBUILD 213056 2014-05-18 13:44:18Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
pkgname=xf86-input-synaptics
pkgver=1.8.0
pkgrel=2
pkgdesc="Synaptics driver for notebook touchpads"