Skip to content

Instantly share code, notes, and snippets.

View aldosch's full-sized avatar

Aldo Schumann aldosch

View GitHub Profile
@aldosch
aldosch / .zshrc
Created April 17, 2024 10:36
brew i
brew() {
if [[ $1 == "i" ]]; then
command brew install "${@:2}"
else
command brew "$@"
fi
}
@aldosch
aldosch / .zshrc
Created April 17, 2024 10:16
fif() – find in file
# find in file
fif() {
if [ ! "$#" -gt 0 ]; then echo "Need a string to search for!"; return 1; fi
rg --files-with-matches --no-messages "$1" | fzf --preview "highlight -O ansi -l {} 2> /dev/null | rg --colors 'match:bg:yellow' --ignore-case --pretty --context 10 '$1' || rg --ignore-case --pretty --context 10 '$1' {}"
}
@aldosch
aldosch / appops.md
Created July 18, 2023 03:48
Change android appops with adb
  • Enable developer mode on android by tapping build number repeatedly
  • Connect to computer via usb
  • Ensure that adb is installed adb --version
  • adb devices to see devices, may need to auth on phone
  • adb shell to get shell
  • pm list packages to list packages
  • pm list packages -3 | cut -f 2 -d ":" to list user installed packages
  • pm list permissions to list all permissions available system-wide
  • appops get <PackageName> to list permissions for a specific app
  • appops set ignore to ignore a permission for a specific app
<tr class="mktoModule" id="module-name" mktoName="Module name" mktoAddByDefault="true">
<td>
...
</td>
</tr>
<!-- ============================================================
X Variables
============================================================ -->
<meta class="mktoColor" id="module__x" mktoName="X colour" default="#fff">
<meta class="mktoString" id="module__x" mktoName="X URL" default="#">
<meta class="mktoList" id="module__x" mktoName="X align" values="left, right, center" default="left">
<mjml>
<mj-head>
<mj-font name="Open Sans" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" />
<mj-attributes>
<mj-text font-family="Open Sans, sans-serif" />
</mj-attributes>
<mj-style inline="inline">
html, body {
background: #F7F7F7;
}
<!-- This should work! -->
<mj-style>
@media only screen and (min-width: 480px) {
.hidden {
display: inherit !important;
}
}
</mj-style>
<!-- This won't work! -->
<mj-style inline="inline">
@media only screen and (min-width: 480px) {
.hidden {
display: inherit !important;
}
}
</mj-style>
<!-- ============================================================
CTA MODULE START
============================================================ -->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#F7F7F7;background-color:#F7F7F7;width:100%;">
<tbody>
<tr>
<td>
<!--[if mso | IE]>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600">
<tr>
<!-- ============================================================
CTA MODULE START
============================================================ -->
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#F7F7F7;background-color:#F7F7F7;width:100%;">
<tbody>
<tr>
<td>
<!--[if mso | IE]>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"