Skip to content

Instantly share code, notes, and snippets.

@lithid
lithid / hide-favicons-FF6.sh
Created September 18, 2011 03:25
Remove the favicons in firefox 7 since its not available for linux!
#!/bin/bash
# Written by lithid for FF7
pro_path=$(find ~/ -iname firefox |grep .mozilla)
short=$(grep 'Path' ~/.mozilla/firefox/profiles.ini |cut -f 2 -d'=')
doesit=$(find $pro_path/$short -type f |grep .mozilla | egrep -ico userChrome.css)
if [ "$doesit" = "0" ]; then
mkdir -p $pro_path/$short/chrome
echo_path="$pro_path/$short/chrome"
@lithid
lithid / check-google-voice.bash
Created January 23, 2012 02:59
Audible notification of new google voice text
#!/bin/bash
# Lithid
while true; do
# Title of the google voice window to look for
# Gmail
#MESSAGE=$(xwininfo -tree -root |grep -c "Gmail - Inbox ([1-999])")
# Google Voice
MESSAGE=$(xwininfo -tree -root |grep -c "Google Voice - Inbox ([1-999])")
$ndb = mysqli_connect (
'localhost',
'user',
'pw',
'db') or die ('Error connecting. Check yo factz!');
$output_form = false;
$content=$_POST['content'];
$content = mysql_real_escape_string($content);
$ndb = mysqli_connect (
'localhost',
'user',
'pw',
'db') or die ('Error connecting. Check yo factz!');
$output_form = false;
$content = mysql_real_escape_string($_POST['content']);
if (isset($_POST['submit'])) {
$ndb = mysqli_connect (
'localhost',
'user',
'pw',
'db') or die ('Error connecting. Check yo factz!');
$output_form = false;
$content=$_POST['content'];
$content = "mysql_real_escape_string($content, $ndb)";
#!/bin/bash
# Installing Boot 2 Gecko Nexus S 4g
# Lithid
ROOTDIR=$(pwd)
ADB="sudo ${ROOTDIR}/tools/Linux/adb"
FASTBOOT="sudo ${ROOTDIR}/tools/Linux/fastboot"
SADB="sudo ${ADB} start-server"
KADB="sudo ${ADB} kill-server"
#!/system/bin/sh
# Remove busybox hardlinks.
for i in `ls /system/xbin/`
do
INODE=`stat $i | grep Inode | awk '{print $4}'`
if [ "$INODE" = "`stat /system/xbin/busybox | grep Inode | awk '{print $4}'`" ]
then
String[] checkRom = {"gapps-geek.sh check-rom"};
String[] checkGapps = {"gapps-geek.sh check-gapps"};
// On check rom Preference
RunAsRoot(checkRom);
// On check gapps Preference
RunAsRoot(checkGapps);
public void RunAsRoot(String[] cmds){
@lithid
lithid / lwjgl-update.sh
Created May 19, 2012 20:53
Download updated lwjgl library for minecraft
#!/bin/bash
# Written by Lithid
URL="http://downloads.sourceforge.net/project/java-game-lib/Official%20Releases/LWJGL%202.6/lwjgl-2.6.zip"
FILE="lwjgl-2.6.zip"
FOLDER="lwjgl-2.6"
DIR="$HOME/.minecraft"
if [ -d $DIR ]; then
cd $DIR
#!/usr/bin/env python
import sys
import platform
p = platform.dist()
distro = p[0]
version = p[1]
name = p[2]
check = (sys.maxsize > 2**32)