Skip to content

Instantly share code, notes, and snippets.

View phillipberndt's full-sized avatar

Phillip Berndt phillipberndt

View GitHub Profile
@phillipberndt
phillipberndt / determine_dependency_versions.py
Last active December 25, 2015 02:09
Script to determine the exact versions of the GTK libraries required for pqiv. See https://github.com/phillipberndt/pqiv/issues/13
#!/usr/bin/env python
# encoding: utf-8
#
# Find minimal required versions of the gtk/gdk/gdk_pixbuf/glib/cairo libs
# for pqiv
#
import re
import sys
import urllib
@phillipberndt
phillipberndt / build-i3.sh
Last active November 5, 2023 19:04
Builder script for i3. Builds the latest i3 from the next branch and its prerequisites. Easily extendable should any dependency be missing from the list.
#!/bin/bash
#
# Build i3 and depencendies.
# by Phillip Berndt, www.pberndt.com, June 2013
#
# The default developer packages from debian based distributions,
# cmake and cairo headers are prerequisites for this script. If
# anything else is missing on your system, this script should be
# easily extendible by inserting further packages into the
# BUILD array below.
@phillipberndt
phillipberndt / gist:5339943
Created April 8, 2013 19:54
Patch against Android Base framework, patched with 4.2 OpenPDroid patches from March 2013. Fixes the Cell Tower bug. Tested with an i9100 / cm10.1. This is probably bad coding style, see https://github.com/wsot/openpdroid_support/issues/1 for details.
diff --git a/services/java/com/android/server/PrivacyTelephonyRegistry.java b/services/java/com/android/server/PrivacyTelephonyRegistry.java
index 36f2d9e..95a3f58 100644
--- a/services/java/com/android/server/PrivacyTelephonyRegistry.java
+++ b/services/java/com/android/server/PrivacyTelephonyRegistry.java
@@ -44,17 +44,25 @@ public class PrivacyTelephonyRegistry extends TelephonyRegistry{
private static final int PERMISSION_CALL_STATE = 3;
private static final int PERMISSION_SERVICE_STATE = 4;
+
+ private Context _context;
@phillipberndt
phillipberndt / move_partition.sh
Created April 7, 2011 10:59
Move a linux partition to use free space before the partition
#!/bin/bash
#
# This script moves a disk's partition. This is useful if you
# want to resize two parititions, making the first one smaller and the second one bigger.
#
# Note that if your partitions are not encrypted, there are GUI tools to
# acomplish this (Gnome's GParted) and if you are using LVM you don't need this
# at all because there is no problem having fragmented partitions with LVM.
# If you can avoid using this script, do it! Using a GUI tool for such delicate stuff
# helps you avoid headaches ;-)
@phillipberndt
phillipberndt / update_urlfilter.ini.pl
Created April 2, 2011 09:34
Update Opera's urlfilter.ini from secure.fanboy.co.nz while preserving custom entries
#!/usr/bin/perl -w
use LWP::Simple;
use Storable;
use strict;
# Configuration
# You can define multiple urlfilter.ini lists to be downloaded
my @remotes = qw(
http://secure.fanboy.co.nz/adblock/opera/urlfilter.ini
);