Skip to content

Instantly share code, notes, and snippets.

@bhundven
bhundven / nineteen.sh
Last active Mar 18, 2020
Enlightenment 19 build script for Ubuntu/Debian
View nineteen.sh
#!/bin/bash
# vi: ts=4:sw=4:et
#
# NINETEEN.SH
# This script allows you to install/update Enlightenment 19 git version on
# Ubuntu 14.04 LTS or Debian wheezy/sid, or remove E19 git from your system.
# Originally from: http://ubuntuforums.org/showthread.php?t=2203190
# By: Philippe J. Guillaumie (batden AT sfr DOT fr).
# Additional updates by: Bryan Hundven (bryanhundven AT gmail DOT com).
#
@bhundven
bhundven / nineteen-wayland.sh
Last active Jan 21, 2019
Enlightenment 19 build script for Ubuntu/Debian with Wayland support.
View nineteen-wayland.sh
#!/bin/bash
# vi: ts=4:sw=4:et
#
# NINETEEN.SH
# This script allows you to install/update Enlightenment 19 git version on
# Ubuntu Wily/15.10 or Debian stretch/sid, or remove E19 git from your system.
# ********************************************************************
# * This version builds enlightenment with wayland. *
# * That means this requires a very recent Ubuntu or Debian version. *
# * This may not work properly! You've been warned! *
@bhundven
bhundven / local_manifest.xml
Last active May 1, 2017
example CM10.1 quincyatt local_manifest.xml
View local_manifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_msm8660-common" path="device/samsung/msm8660-common" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_quincyatt" path="device/samsung/quincyatt" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_quincy-common" path="device/samsung/quincy-common" revision="cm-10.1" />
<project name="CyanogenMod/android_kernel_samsung_msm8660-common" path="kernel/samsung/msm8660-common" revision="cm-10.1" />
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" revision="cm-10.1" />
</manifest>
@bhundven
bhundven / email_notifier.py
Last active Mar 31, 2016
python mutt+maildir notifier using python
View email_notifier.py
#!/usr/bin/python2
# Based on: https://bbs.archlinux.org/viewtopic.php?pid=962423#p962423
# This version is modified to handle mailboxes with spaces in the names
import pyinotify
import pynotify
from os.path import expanduser
from mailbox import MaildirMessage
from email.header import decode_header
from gtk.gdk import pixbuf_new_from_file
@bhundven
bhundven / gerrit-mirror.sh
Last active Dec 18, 2015
Full mirror from gerrit project listing.
View gerrit-mirror.sh
#!/bin/bash
#set -x
## Variables
# myname: This scripts name.
declare myname="${0##*/}"
# gerrit_host: The gerrit host we can query to get the list of projects.
declare gerrit_host
# git_host: The git url where the source can be downloaded.
@bhundven
bhundven / .bash_functions
Last active Aug 29, 2015
Handy way to add patches to quilt.
View .bash_functions
# vi: ts=4:sw=4:et:ai:ft=sh
quilt-add-patch ()
{
dir=$1;shift
patch_file=$1;shift
quilt new $(basename ${patch_file} | sed -e 's/\.diff//' | sed -e 's/\.patch//')
quilt add $(awk '/^---/{ print $2 }' "${dir}/${patch_file}" | sed -e 's/a\///')
patch -p1 < "${dir}/${patch_file}"
quilt refresh
@bhundven
bhundven / blah.cfg
Created May 21, 2014
example of slim centos package list
View blah.cfg
%packages --ignoremissing
@Core
python-simplejson
ansible
sudo
# We don't need any special firmware files
-aic94xx-firmware
-atmel-firmware
-bfa-firmware
-ipw2100-firmware
@bhundven
bhundven / installed-requirements.sh
Last active Aug 29, 2015
The path to making CentOS 6.5 slimmer ;)
View installed-requirements.sh
for package in $(rpm -qa --queryformat "%{NAME}\n" | sort -u); do
req=$(rpm -q --queryformat "%{NAME}\n" --whatrequires "$package")
if echo "$req" | grep -q "no package requires"; then
echo "$req"
else
printf "package: $package is required by:\n"
for required in $(rpm -q --queryformat "%{NAME}\n" --whatrequires $package | sort -u); do
printf "\t%s\n" "$required"
done
fi
@bhundven
bhundven / gist:ffdfd8af149f67b95de8
Created May 13, 2014
hammerhead aosp/master localmanifest.xml
View gist:ffdfd8af149f67b95de8
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github"
fetch=".." />
<project path="vendor/lge/hammerhead" name="jamesonwilliams/vendor_lge_hammerhead" revision="android-4.4.2_r1" remote="github" />
<project path="vendor/qcom/hammerhead" name="jamesonwilliams/vendor_qcom_hammerhead" revision="android-4.4.2_r1" remote="github" />
</manifest>