Skip to content

Instantly share code, notes, and snippets.

View KhasMek's full-sized avatar
⚠️
uncaught exception

Khas'Mek KhasMek

⚠️
uncaught exception
View GitHub Profile
grep aokp .repo/manifest.xml | cut -f2 -d '"'
@KhasMek
KhasMek / fu.sh
Created October 10, 2012 01:55
merging is boring as fuck. at least this makes it a bit less monotonous. WIP
#!/bin/bash
# fuck this shit.
aosp_tag=android-4.1.2_r1
git remote add aosp https://android.googlesource.com/platform/"${1}"/
git fetch aosp
git merge $aosp_tag
@KhasMek
KhasMek / khas_is_a_slacker.sh
Created October 10, 2012 14:56
not another image manipulation script. xD
#!/bin/bash
#
# Image template creator and thumbnail maker.
#
# USAGE: ./make_lazy $CUSTOM_TITLE_NAME
# If CUSTOM_TITLE_NAME is blank, it will use the actual filename
# (with underscores and all).
# Currently supported formats are .png and .jpg.
#
# In addition to most normal linux apps, this script will
@KhasMek
KhasMek / bj.sh
Created November 27, 2012 21:11
project management or some crap.
#!/bin/bash
# Fuck more characters.
# I'm so fucking lazy
#set -x
remote=bcf
# PUSH TO HEAD ONLY IF YOU KNOW WHAT YOU'RE DOING
giggitty=refs/heads/jb-mr1
# url is usually something like
# ssh://john.doe@http://gerrit.sudoservers.com/:29418
#!/bin/bash
#
# For Android Police
# From KhasMek
# I love you guys
#
# To run chmod a+x, move to the topdir of and AOSP build tree and execute
# ./tag_changelog_gen.sh "old tag label" "new tag label"
# example: ./tag_changelog_gen.sh android-4.1.2_r1 android-4.2_r1
@KhasMek
KhasMek / sms_filter.sh
Last active December 17, 2015 12:19
A quick script to read an xml file from SMSBackup and create a new file based on filtering by a wildcard (date/sender/etc).
#!/bin/bash
#
# A quick script to read an xml file from SMSBackup and create a new file
# based on filtering by a wildcard (date/sender/etc).
# ToDo smarter filtering by tags set in xml.
filename=
wildcard=
new_file=
xsl=
{
"wallpapers": {
"category": [
{
"name": "Lex",
"wallpaper": [
{
"author": "By Lex",
"url": "http://www.peripheraldimensions.com/Wedding/Lex/images/wedding_1_100_of_107.jpg",
"thumbUrl": "http://www.peripheraldimensions.com/Wedding/Lex/thumbs/wedding_1_100_of_107_thumb.gif",
@KhasMek
KhasMek / run_many.py
Created August 11, 2013 15:08
A python script to run a command on multiple machines at once. Taken from jlebar's conf repo found at https://bitbucket.org/jlebar/conf/src/e4c58e7abde0/bin/run-many
#!/usr/bin/python
"""Runs the given command on the given set of machines."""
import sys
import os
import re
import time
from subprocess import Popen, PIPE
from select import select
@KhasMek
KhasMek / vendor_proprietary_update.sh
Created September 17, 2013 02:58
lazydev Run from vendor/$company/$device for now. proprietary_vendor_dir = The folder to be updated
#!/bin/bash
proprietary_vendor_dir=
ls | grep -v '.mk$' | while read line; do
dest=`find $proprietary_vendor_dir -name $line`
cp -v $line $dest
done
@KhasMek
KhasMek / meme_sort.sh
Created January 25, 2014 17:04
BASH:pull memes
#!/bin/bash
# A script to keep my fucking meme downloads somewhat manageable
# The goal of this script is to comm two dirs (one on my android
# device and the other locally, then sort the new files into a new
# folder to then be uploaded to $social_network. Maybe a final option to
# move the images to the old folder after the upload is complete
# would be good too. And remvoing of (1) files.)
#
# TODO: Make not so ghetto