Skip to content

Instantly share code, notes, and snippets.

@weedy
weedy / 99-android.rules
Created April 6, 2019 06:43 — forked from ktnr74/99-android.rules
Universal udev rules file to set Android device permissions
# do not forget to run 'sudo udevadm control --reload-rules' after editing this file
ACTION!="add", GOTO="android_usb_rules_end"
SUBSYSTEM!="usb", GOTO="android_usb_rules_end"
ENV{DEVTYPE}!="usb_device", GOTO="android_usb_rules_end"
ENV{ID_SERIAL_SHORT}=="", GOTO="android_empty_serial"
ENV{ID_SERIAL_SHORT}=="0000:*", GOTO="android_empty_serial"
ENV{ID_SERIAL_SHORT}=="0123456789ABCDEF", GOTO="android_empty_serial"
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
@weedy
weedy / gist:cb042f4a11d2a5f94d1b228820be9184
Last active October 25, 2016 22:38 — forked from Ins1ghtLabs/gist:c346f7ed4f257d1b4a2d
OpenWRT RTL8812AU Makefile
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
@weedy
weedy / hide-blogger-warning.user.js
Last active July 14, 2017 15:23 — forked from obeattie/hide-blogger-warning.user.js
Automatically skips the obnoxious "Content warning" on Blogger sites (only those with blogspot.com domains).
// ==UserScript==
// @name Blogger Content Warning Skip
// @description Automatically skips the content warning on blogspot.com sites without reloading the page
// @grant none
// @match http://*.blogspot.ca/*
// @match http://*.blogspot.com/*
// ==/UserScript==
var fireEvent = function(obj,evt){
var fireOnThis = obj;
@weedy
weedy / gist:4089728
Created November 16, 2012 18:36
"Universal" System Identification & Mounting thingy
#!/sbin/busybox sh
# Weedy - miuiandroid.com
# ./usim - "Universal" System Identification & Mounting thingy
# 0.1 - 12-11-16 - Initial release.
cwmPid=$(ps | grep -v "grep" | grep -o -E "(.*)update_binary" | cut -d " " -f 3)
cwmFD=$(ps | grep -v "grep" | grep -o -E "update_binary(.*)" | cut -d " " -f 3)
logFile="/sdcard/usim-errors.log"
passedDev="$*"
recoveryDev=$(awk '/ro.product.device=/ {split($0,dev,"="); print dev[2]}' < /default.prop)
if [ -z "$passedDev" ]; then passedDev="$recoveryDev"; fi