Skip to content

Instantly share code, notes, and snippets.

View growtopiajaw's full-sized avatar
🏠
Working from home

Growtopia Jaw growtopiajaw

🏠
Working from home
  • gjaw.duckdns.org
  • Malaysia
View GitHub Profile
@growtopiajaw
growtopiajaw / update-python.md
Created August 11, 2018 05:09
update-alternatives for python2 and python3 in Ubuntu 16.04.x

List available python options

ls -larth `which python`*
lrwxrwxrwx 1 root root   10 Mar 23  2016 /usr/bin/python3m -> python3.5m
lrwxrwxrwx 1 root root    9 Mar 23  2016 /usr/bin/python3 -> python3.5
lrwxrwxrwx 1 root root    9 Nov 24  2017 /usr/bin/python2 -> python2.7
lrwxrwxrwx 1 root root    9 Nov 24  2017 /usr/bin/python -> python2.7
-rwxr-xr-x 2 root root 4.3M Nov 28  2017 /usr/bin/python3.5m
-rwxr-xr-x 2 root root 4.3M Nov 28  2017 /usr/bin/python3.5
@growtopiajaw
growtopiajaw / build.sh
Last active December 12, 2018 03:05
LineageOS 15.1 buildbot script
#! /usr/bin/env bash
#The MIT License
#Copyright (c) 2018 Growtopia Jaw
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@growtopiajaw
growtopiajaw / roomservice.xml
Last active December 12, 2018 15:14
Xiaomi Redmi 5A roomservice.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="GrowtopiaJaw/android_device_xiaomi_riva" path="device/xiaomi/riva" remote="github" revision="treble-vanila" />
<project name="GrowtopiaJaw/riva_kernel_xiaomi_msm8917" path="kernel/xiaomi/msm8917" remote="github" revision="treble" />
<project name="GrowtopiaJaw/android_vendor_xiaomi_riva" path="vendor/xiaomi/riva" remote="github" revision="treble-vanila" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" revision="lineage-15.1"/>
</manifest>
@growtopiajaw
growtopiajaw / README.md
Last active December 12, 2018 17:31
Xiaomi Redmi 5A build instructions + spec sheet

LineageOS Project (c) 2018

Branch

  • treble (unmaintained/ unstable/ unbuildable)
  • treble-vanilla (stable/ with cherry-pick from treble-vanilla_testing)
  • treble-vanilla_testing (unstable)

Build instructions for Xiaomi Redmi 5A (riva)

@growtopiajaw
growtopiajaw / README.md
Last active December 13, 2018 18:04
GitHub APIv3 release assets uploader without any external dependencies

Usage

GITHUB_TOKEN=<token> ./create-release username/reponame <tag-name> <path-to-upload>

Example: GITHUB_TOKEN=4a68631afb82bala9f9c49892e0e3c82eaa7ef66 ./create-release GrowtopiaJaw/adb-wireless v1 adb-wireless.zip

Credits and Source

@growtopiajaw
growtopiajaw / zip2tgz.sh
Last active December 29, 2018 15:37 — forked from natemcmaster/zip2tgz.sh
Convert zip to tar.gz file
#!/usr/bin/env bash
if [[ $# < 2 ]]; then
echo "Usage: [src] [dest]"
exit 1
fi
function realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
@growtopiajaw
growtopiajaw / wp-disable-plugin-update.php
Created April 19, 2019 01:06 — forked from ebetancourt/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
<?php
// have to add that opening tag to get syntax highlighting... ¯\_(ツ)_/¯
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
@growtopiajaw
growtopiajaw / fix-wordpress-permissions.sh
Last active May 17, 2019 23:15 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=daemon # <-- wordpress owner
WP_GROUP=daemon # <-- wordpress group
WP_ROOT=./ # <-- wordpress root directory
Listen 443
SSLProtocol TLSv1.2
SSLOpenSSLConfCmd Curves secp521r1:secp384r1:prime256v1
SSLHonorCipherOrder on
SSLCipherSuite "!ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:!ECDHE-ECDSA-AES128-SHA:!ECDHE-ECDSA-AES256-SHA:!ECDHE-ECDSA-AES128-SHA256:!ECDHE-ECDSA-AES256-SHA384:!ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:!ECDHE-RSA-AES128-SHA:!ECDHE-RSA-AES256-SHA:!ECDHE-RSA-AES128-SHA256:!ECDHE-RSA-AES256-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-SHA:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA256:!DHE-RSA-AES256-SHA256"
SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:/opt/bitnami/apache2/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
SSLCompression off
SSLSessionTickets off
/* PrismJS 1.16.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+apacheconf&plugins=line-highlight */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {