Skip to content

Instantly share code, notes, and snippets.

View sultanqasim's full-sized avatar

Sultan Qasim Khan sultanqasim

View GitHub Profile
@sultanqasim
sultanqasim / squid_build_script.sh
Last active August 2, 2017 04:43
Squid Kernel Build Script
#!/bin/bash
export ARCH=arm
export CROSS_COMPILE=~/tiva_tools/gcc-linaro-6.3.1-2017.05-x86_64_armv8l-linux-gnueabihf/bin/armv8l-linux-gnueabihf-
OUT_DIR=/files/squid_kernel_builds
VER="r20"
set -e
cd /files/squid_kernel
git checkout squid_nougat
make mrproper
@sultanqasim
sultanqasim / vendor_blobs_automator3.py
Last active April 2, 2018 16:56
Android Vendor Blobs Script
# Script to automate generation of vendor blob makefiles
# for custom Android ROMs
from sys import argv
from os import walk, getcwd
from os.path import join
from datetime import date
header = """# Copyright (C) %i The CyanogenMod Project
#
@sultanqasim
sultanqasim / motorola.xml
Last active November 10, 2017 19:37
Lineage 14.1 Manifest
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_kernel_motorola_msm8610" path="kernel/motorola/msm8610" remote="github" />
<project name="LineageOS/android_device_motorola_otus" path="device/motorola/otus" remote="github" />
<project name="LineageOS/android_device_motorola_condor" path="device/motorola/condor" remote="github" />
<project name="LineageOS/android_device_motorola_msm8610-common" path="device/motorola/msm8610-common" remote="github" />
<!--
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" />
<project name="moto8916/proprietary_vendor_motorola" path="vendor/motorola" remote="github" />
# Script to add back comments removed from source code
# Example use case: comments stripped out of HTC kernel releases
#
# Copyright (C) 2016 Sultan Qasim Khan
#
# Usage:
# 1. Find the closest upstream source release with comments (eg. CAF)
# 2. After checking out the closest upstream release, create a git
# commit overlaying the OEM modifications. Do this by replacing
# all files with the OEM versions and committing the change.
@sultanqasim
sultanqasim / config.txt
Last active June 23, 2016 03:24
Raspberry Pi 3 Configuration
# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1
@sultanqasim
sultanqasim / zram.sh
Created June 21, 2016 02:41
ZRAM config for Raspberry Pi 3
#!/bin/bash
# Raspberry Pi ZRAM script
# Tuned for quad core, 1 GB RAM models
# put me in /etc/init.d/zram.sh and make me executable
# then run "sudo update-rc.d zram.sh defaults"
modprobe zram
echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm
@sultanqasim
sultanqasim / .vimrc
Last active November 5, 2017 19:13
decent .vimrc
filetype on
filetype plugin on
filetype indent on
" Syntax highlight without being too slow
syntax on
set synmaxcol=255
" Use 4 space tabs by default
set tabstop=4
@sultanqasim
sultanqasim / fstab
Last active June 23, 2016 04:57
Raspberry Pi fstab addtions
tmpfs /tmp tmpfs defaults,noatime,nosuid,size=120m 0 0
tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=50m 0 0
@sultanqasim
sultanqasim / fedora_android_deps
Last active April 30, 2017 14:25
Dependencies for building Android on Fedora 25
mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod +x ~/bin/repo
sudo dnf install python glibc.i686 libstdc++.i686 java maven ccache schedtool ncurses-compat-libs m4 xz-lzma-compat ImageMagick
sudo ln -s /usr/lib/jvm/java-1.8.0-openjdk /usr/lib/jvm/java-8-openjdk-amd64
@sultanqasim
sultanqasim / LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR.html
Last active July 10, 2020 21:46
Modernized specification for LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR</title>
<link href="tcpdump-style.css" rel="stylesheet" type="text/css" media="screen">
</head>
<body>
<div id="page">
<div class="post">