Skip to content

Instantly share code, notes, and snippets.

View seanlilmateus's full-sized avatar

Mateus seanlilmateus

View GitHub Profile
@Arinerron
Arinerron / permissions.txt
Last active April 14, 2025 21:41
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO
@tniessen
tniessen / service.md
Created October 1, 2016 11:46
Using the "service" tool with ADB and why to avoid it

As it turns out, it is not trivial to control the audio volume of an Android device using ADB. At the time of writing, the only way appears to be using the service tool. Actually, the service command allows to "connect" to a number of services (104 on Android 6.0.1) and invoke functions. Not knowing much about this tool, I managed to completely mute all sounds and speakers of my Nexus 5, and I was stuck without any sound for quite some time. I did not find a way to unmute the sound from within the system UI, so I got to dive a little deeper into this.

If you know which service you want to use, you then need to find its interface declaration. The command

service list

gives you a list of all services with the associated interfaces, if applicable:

...

26 backup: [android.app.backup.IBackupManager]

  • list packages adb shell pm list packages -f
  • delegate package adb shell am start -a android.intent.action.DELETE -d package:
@takuoka
takuoka / AutoGrowingTextField.swift
Last active January 18, 2022 13:02
Example of an NSTextField that expands its height automatically. https://github.com/DouglasHeriot/AutoGrowingNSTextField
import Cocoa
// https://github.com/DouglasHeriot/AutoGrowingNSTextField
// for AutoLayout
class AutoGrowingTextField: NSTextField {
var minHeight: CGFloat? = 100
@stonehippo
stonehippo / docker_usb_guest_osx.md
Last active June 12, 2024 10:36
Getting a USB device to show up in a Docker container on OS X

Getting a USB device to show up in a Docker container on OS X

Some background

I was trying to get the Arduino IDE to work inside a Docker container on OS X. I was able to get the IDE working (see Getting X11 GUI applications to work on OS X with Docker), but I could not figure out how to make the USB port for the Arduino visible.

The solution

I first tried to directly map hardware serial port into the Docker container, doing something like this:

@logrusorgru
logrusorgru / mysql.sql
Last active March 2, 2025 05:39
SQL: uniqueness, automatic created_at, updated_at refresh + soft delete. SQLite, PostgreSQL, MySQL
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
-- mysql --
-- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- mysql <http://sqlfiddle.com/#!9/91afb5/2>
-- note: sqlfiddle is very stupid
@koppen
koppen / pre-commit
Created January 25, 2016 08:50
Run rubocop on pre-commit
# .git/hook/pre-commit
#!/bin/sh
#
# Check for ruby style errors
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
NC='\033[0m'
@orta
orta / notes.md
Last active November 7, 2016 02:54
Notes on Spacemacs

Start out

install via

  brew tap railwaycat/homebrew-emacsmacport
  brew install emacs-mac --with-spacemacs-icon  # OR, brew cask install emacs-mac
  brew linkapps

Terminology

@geekman
geekman / bruteforce-cfg1.go
Created December 30, 2015 08:35
32c3CTF 2015 bruteforce tool for "config.bin"
/*
* bruteforce-cfg1.go
* to bruteforce CFG1 encryption passwords for 32c3CTF "config.bin"
*
* @zxcvgm
*/
package main
import (
brutedict "github.com/dieyushi/golang-brutedict"
@jhotmann
jhotmann / GlobalSettings.txt
Created December 9, 2015 17:00
Android Settings
adb_enabled=1
airplane_mode_on=0
airplane_mode_radios=cell,bluetooth,wifi,nfc,wimax
airplane_mode_toggleable_radios=bluetooth,wifi,nfc
assisted_gps_enabled=1
audio_safe_volume_state=1
auto_time=1
auto_time_zone=1
bluetooth_on=1
bugreport_in_power_menu=0