Skip to content

Instantly share code, notes, and snippets.

View steadfasterX's full-sized avatar
😆
stateless but steadfast

steadfasterX steadfasterX

😆
stateless but steadfast
View GitHub Profile
curl -i -u YOURUSER -X GET https://api.github.com/repos/ORG/REPO/hooks
curl -i -u YOURUSER -X PATCH https://api.github.com/repos/ORG/REPO/hooks/IRC_HOOK_ID -d "{ \"add_events\": [\"push\", \"pull_request\", \"issues\"] }"
@steadfasterX
steadfasterX / beautiful-failure.py
Created June 29, 2017 11:05 — forked from MatthiasWinkelmann/beautiful-failure.py
An Ansible plugin to format console output
# Save as <folder with your playbook>/callback_plugins/<some name>.py
# Optionally use no_log: True on your playbook/roles/tasks to suppress other output
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import time
import json
import sys
@steadfasterX
steadfasterX / bt-audio-logcat
Last active May 9, 2018 19:26
BT audio issue
05-09 08:21:20.829 0 0 E [ 1274.011185 / 05-09 08:21:20.823][1] init: property_set("ro.boottime.audioserver", "1274003857117") failed: property already set
05-09 08:21:21.105 22907 22907 E APM::Serializer: deserialize: Could not parse /odm/etc/audio_policy_configuration.xml document.
05-09 08:21:21.105 22907 22907 E APM::Serializer: deserialize: Could not parse /vendor/etc/audio_policy_configuration.xml document.
05-09 08:21:21.146 22907 22907 W hardware_info: update_hardware_info_8994: sfX: Not an 8994 device
05-09 08:21:21.206 6855 8975 E AudioService: Audioserver started.
05-09 08:21:21.240 0 0 E : [ 1274.422784 / 05-09 08:21:21.235][4] msm_qti_pp_get_rms_value_control, back not active to query rms be_idx:3
05-09 08:21:21.240 0 0 E : [ 1274.426168 / 05-09 08:21:21.239][4] msm_pcm_volume_ctl_get substream runtime not found
05-09 08:21:21.240 0 0 E : [ 1274.426337 / 05-09 08:21:21.239][4] msm_pcm_volume_ctl_get substream runtime not found
05-09 08:21:
on FWUL:
-----------------------------------------------
cd ~/programs/lglafng
git pull
git checkout develop
git pull
sudo python partitions.py --list --debug
sudo python partitions.py --list --batch --debug
@steadfasterX
steadfasterX / Android.mk (fake target - mka getholydebugvars)
Last active May 7, 2019 11:34
mka getholydebugvars (print debug vars in a make env)
# crucial important for getholydebugvars: Indents!
# If you open this file within vi/vim and see the first line red marked your vimrc is wrongly setup.
# Ensure you have NOT set "expandtab" there and better enforce it by "noexpandtab" e.g. like that:
# set tabstop=8 softtabstop=0 noexpandtab shiftwidth=4 smarttab
# with the above conf it requires 2 tabs for every line to make it work
getholydebugvars:
$(hide) echo "TARGET_IS_64_BIT: $(TARGET_IS_64_BIT)"
$(hide) echo "TARGET_ARCH: $(TARGET_ARCH)"
$(hide) echo "TARGET_ARCH_VARIANT: $(TARGET_ARCH_VARIANT)"
@steadfasterX
steadfasterX / gist:108c1c424f5a237d7e08afc6be34185b
Created April 30, 2019 14:13
tombstone: mm-qcamera-daemon
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
LineageOS Version: '16.0-20190430-UNOFFICIAL-h815_usu'
Build fingerprint: 'lge/p1_global_com/p1:6.0/MRA58K/152940055675e:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 1438, tid: 1438, name: mm-qcamera-daem >>> /system/vendor/bin/mm-qcamera-daemon <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '*** timed out in posting event. please refer to tombstones ***'
r0 00000000 r1 0000059e r2 00000006 r3 00000008
r4 0000059e r5 0000059e r6 ffc496fc r7 0000010c
adb shell find system -name nfc_nci.msm8992.so
-------------------------------------------------------------------
> system/vendor/lib64/hw/nfc_nci.msm8992.so
> system/vendor/lib/hw/nfc_nci.msm8992.so
product/nfc.mk
-------------------------------------------------------------------
PRODUCT_PACKAGES += \
@steadfasterX
steadfasterX / gist:8f05f6f222d8ed4e2bb8b0883b1af282
Last active May 12, 2019 18:23
selinux: permissive or enforcing?
adb logcat -b kernel |grep avc:
> 05-12 20:10:27.665 0 0 E [ 16.154118 / 05-12 18:10:27.658][1] selinux: avc: denied { set } for
property=ro.bluetooth.sap pid=3540 uid=0 gid=0 scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:default_prop:s0
tclass=property_service permissive=1
--------------------------
adb shell getenforce
@steadfasterX
steadfasterX / autorun_on_boot.cmd
Last active March 28, 2024 08:18 — forked from LiamKarlMitchell/HideVirtualBox.bat
Hide Virtual Machine
rem Autorun script needed to run on every boot with admin perms!
rem Important: you need to use hideVBoxVM.py <name> on your VM as well, this cmd alone is not enough
@echo off
set TARGET="HPE"
@reg copy HKLM\HARDWARE\ACPI\DSDT\VBOX__ HKLM\HARDWARE\ACPI\DSDT\%TARGET%__ /s /f
@reg delete HKLM\HARDWARE\ACPI\DSDT\VBOX__ /f
@steadfasterX
steadfasterX / slack_alert.py
Last active March 20, 2020 14:52 — forked from ashishterp/slack_alert.py
Splunk Alerting to Slack
# Instructions:
# 1. Go to https://[yourdomain].slack.com/services/new
# 2. Configure a new Incoming WebHook and paste the URL below on Line 14
# 3. Copy this file into $SPLUNK_HOME$/bin/scripts
# 4. Configure your saved search to run slack_alert.py
from time import gmtime, strftime
import httplib, json
import getopt, sys, os
import subprocess