Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2018 beebird
#
# Distributed under terms of the MIT license.
"""
@beebird
beebird / adb_toggle_airplane_mode.sh
Created March 31, 2018 13:10 — forked from xgouchet/adb_toggle_airplane_mode.sh
Shell script to toggle airplane mode on connected device
function adb_toggle_airplane_mode {
# Open airplane mode settings
adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
# Key UP to focus on the first switch = toggle airplane mode, then sleep 100ms
adb shell input keyevent 19 ; sleep 0.1
# Key CENTER to toggle the first switch, then sleep 100ms
adb shell input keyevent 23 ; sleep 0.1
@beebird
beebird / patch-edid.md
Created April 7, 2016 15:33 — forked from ejdyksen/patch-edid.md
A script to fix EDID problems on external monitors in Mac OS. Source: http://embdev.net/topic/284710

patch-edid.rb

A script to fix EDID problems on external monitors in Mac OS.

  1. Connect the problem monitor.

  2. Download this script into your /System/Library/Displays/Overrides (note: this file is only writeable by root, so some commands require sudo).