Skip to content

Instantly share code, notes, and snippets.

@vinecodes
vinecodes / example.nginx
Created December 17, 2018 05:38 — forked from gsanders5/example.nginx
Automatic nginx virtual subdomains with sub-folders or sub-directories
# Automatic nginx virtual subdomains with sub-folders or sub-directories
#
# Since the original source where I found this code is now offline, I have decided to mirror it here.
# All credit goes to: http://web.archive.org/web/20150307193208/http://www.messaliberty.com/2010/10/automatic-nginx-virtual-subdomains-with-sub-folders-or-sub-directories
#
# Description: In my web root directory I wanted create a folder called photos, and another called
# music using a sftp program. Without manually going back to the config file or to the shell I like to
# be able to access them at photos.nginxdomain.com and music.nginxdomain.com. That is what this config does.
# Redirect visitors from http://nginxdomain.com/ to http://www.nginxdomain.com/
@vinecodes
vinecodes / building-kernel
Created October 10, 2018 06:22
Merge LGE msm8916 drivers in LA.BR.1.2.9.1-02310-8x16.0
git cherry-pick 8d0e4859f6986ab433c73cb78969de98d6a244ee
After finishing fixing merge conflicts, run,
git cherry-pick --continue
git push -u origin oreo-vol
--------- beginning of main
01-01 00:03:15.104 269 269 W auditd : type=2000 audit(0.0:1): initialized
01-01 00:03:16.539 269 269 I auditd : type=1403 audit(0.0:2): policy loaded auid=4294967295 ses=4294967295
01-01 00:03:16.549 1 1 I init : type=1400 audit(0.0:3): avc: denied { module_request } for kmod="personality-8" scontext=u:r:init:s0 tcontext=u:r:kernel:s0 tclass=system permissive=1
01-01 00:03:16.579 209 209 I ueventd : type=1400 audit(0.0:4): avc: denied { module_request } for kmod="personality-8" scontext=u:r:ueventd:s0 tcontext=u:r:kernel:s0 tclass=system permissive=1
01-01 00:03:16.799 1 1 I init : type=1400 audit(0.0:5): avc: denied { create } for name="sdcard" scontext=u:r:init:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=1
01-01 00:03:16.949 227 227 I e2fsck : type=1400 audit(0.0:6): avc: denied { module_request } for kmod="personality-8" scontext=u:r:fsck:s0 tcontext=u:r:kernel:s0 tclass=system permissive=1
01-01 00:03:17.009 227 227 I
@vinecodes
vinecodes / init.qcom.power.rc
Last active March 8, 2018 19:03
G4c Candy ROM - Remove mpdecision
on early-init
on boot
# Enable low power modes
write /sys/module/lpm_levels/parameters/sleep_disabled 0
# HMP scheduler load tracking settings
write /proc/sys/kernel/sched_ravg_hist_size 3
@vinecodes
vinecodes / init.qcom.rc
Created March 8, 2018 18:58
G4c mpdecision removal
# Copyright (c) 2009-2012, 2014-2015, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
@vinecodes
vinecodes / dumpstate.te
Created March 5, 2018 22:01
Candy ROM Fix
# For prefetcher to read themes
allow dumpstate dalvikcache_data_file:dir r_dir_perms;
allow dumpstate dalvikcache_data_file:file r_file_perms;
allow dumpstate resourcecache_data_file:dir r_dir_perms;
allow dumpstate resourcecache_data_file:file r_file_perms;
allow dumpstate fuse:dir r_dir_perms;
allow dumpstate fuse:file r_file_perms;
#allow dumpstate themeservice_app_data_file:dir r_dir_perms;
#allow dumpstate themeservice_app_data_file:file r_file_perms;
allow dumpstate media_rw_data_file:dir search;
@vinecodes
vinecodes / compile-kernel-G4c
Last active March 6, 2018 21:37
Kernel Compilation Guide for LG G4c
Kernel Compilation Guide
Author: Vineeth Penugonda
(1) git clone https://github.com/LG-K10/android_kernel_lge_msm8916.git -b cm-14.1
(2) git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
(3) sudo gedit ~/.profile.
Then, source ~/.profile.
(4) (Add below lines at the end)
# Architecture
# For 64 bit
TARGET_ARCH := arm64
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 := armeabi-v7a
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_VARIANT := generic
# For 32 bit
TARGET_2ND_ARCH := arm