Skip to content

Instantly share code, notes, and snippets.

#####
# Instructions
####
# BE SURE TO INSTALL TMUX Plugin Manager
# https://github.com/tmux-plugins/tpm
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# then Load tmux configurations
#> tmux source-file ~/.tmux.conf
@shaqman
shaqman / Google Photo Plus
Created December 12, 2018 11:03
UserScripts
// ==UserScript==
// @name Google Photo Plus
// @version 1.0
// @description Add various functionalities to google photo web interface
// @include http*://*photos.google*
// @namespace eto
// @run-at document-idle
// @grant none
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
// ==/UserScript==
@shaqman
shaqman / Allows
Created October 14, 2018 22:56
SELinux Denials
# 10-15 05:48:53.929 681 681 I storaged: type=1400 audit(0.0:12294): avc: denied { read } for name="stat" dev="sysfs" ino=22317 scontext=u:r:storaged:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
allow storaged sysfs:tclass { read };
# 10-15 05:48:53.929 681 681 I storaged: type=1400 audit(0.0:12295): avc: denied { open } for path="/sys/devices/soc.0/f9824900.sdhci/mmc_host/mmc0/mmc0:0001/block/mmcblk0/stat" dev="sysfs" ino=22317 scontext=u:r:storaged:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
allow storaged sysfs:tclass { open };
# 10-15 05:48:53.929 681 681 I storaged: type=1400 audit(0.0:12296): avc: denied { getattr } for path="/sys/devices/soc.0/f9824900.sdhci/mmc_host/mmc0/mmc0:0001/block/mmcblk0/stat" dev="sysfs" ino=22317 scontext=u:r:storaged:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
allow storaged sysfs:tclass { getattr };
# 10-15 05:48:57.419 2612 2612 I .android.chrome: type=1400 audit(0.0:12297): avc: denied { open } for path="/proc/v
@shaqman
shaqman / Tmux cheatsheet.txt
Last active September 3, 2018 03:07
Various snippets
# Kill all sessions except current active one
tmux kill-session -a
@shaqman
shaqman / Building Steps
Last active October 15, 2018 23:42
Android Compiling cheatsheet
# Initialize the repo using the desired branch
repo init -u https://github.com/AICP/platform_manifest.git -b p9.0
# After the initial init, or you want to go to a clean state according to upstream
repo sync -q --force-sync
# Optionally, pick any other changes that haven't been merged. Eg:
repopick -t hima-pie
# Build it.
@shaqman
shaqman / gist:1dd0e2a95590ea85e1662220bb9f9515
Last active April 15, 2018 22:43
Configuration tweak for netbeans 8.2. Should limit memory usage and uses new GC. Put it inside netbeans.conf. Usually located at: [NB Installation folder]/etc/netbeans.conf. Should also be adjustable for any apps. that uses jvm
netbeans_default_options="-J-client -J-Xss2m -J-Xms384m -J-Xmx384m
-J-XX:NewSize=128m -J-XX:MaxNewSize=256m -J-XX:MaxMetaspaceSize=456m
-J-XX:+UseG1GC
-J-XX:MaxGCPauseMillis=100 -J-XX:ParallelGCThreads=4
-J-XX:+ParallelRefProcEnabled
-J-XX:+UseStringDeduplication -J-XX:+UseLWPSynchronization
-J-XX:CompileThreshold=100 -J-Djava.net.preferIPv4Stack=true
-J-Xshare:on
-J-XX:+AggressiveOpts-J-Dsun.java2d.opengl=true -J-Dawt.useSystemAAFontSettings=on
-J-Dsun.java2d.xrender=true -J-Dsun.java2d.dpiaware=true -J-Dnetbeans.winsys.statusLine.in.menuBar=true