Skip to content

Instantly share code, notes, and snippets.

Johnny Sung j796160836

Block or report user

Report or block j796160836

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
@j796160836
j796160836 / RemoveWin10PreInstallApps.ps1
Created Aug 7, 2019
Remove Win10 unused pre installed apps (Run it with Windows PowerShell (Admin))
View RemoveWin10PreInstallApps.ps1
# Run with Windows PowerShell (Admin)
# https://www.thewindowsclub.com/remove-built-windows-10-apps-users-using-powershell-script
Get-AppxPackage *3dbuilder* | Remove-AppxPackage
Get-AppxPackage *officehub* | Remove-AppxPackage
Get-AppxPackage *getstarted* | Remove-AppxPackage
Get-AppxPackage *skypeapp* | Remove-AppxPackage
@j796160836
j796160836 / Gatekeeper_issue.md
Last active Dec 3, 2018
Gatekeeper issue.md
View Gatekeeper_issue.md

[LockedApp] can’t be opened because it is from an unidentified developer. Your security preferences allow installation of only apps from the App Store and identified developers.

This is actually a macOS Gatekeeper issue try these steps:

To resolute Gatekeeper issues on macOS Sierra you might have to partially or completely disable Gatekeeper checks.

Option I For a certain application run in Terminal:

View 用 ADB 切換語言.md

用 ADB 切換語言

Method 1

$ adb shell "setprop persist.sys.language zh; setprop persist.sys.country TW; setprop ctl.restart zygote"

Method 2

@j796160836
j796160836 / adbTopMostActivity.sh
Created Sep 25, 2018
Get the top most activity from adb command
View adbTopMostActivity.sh
#!/bin/bash
devices=`adb devices | awk '{if(NR>1)print $1}'`
for device in $devices ; do
model=`adb -s $device shell getprop ro.product.model`
echo
echo '=== '$model' ('$device') ==='
adb -s $device shell dumpsys activity top | grep ACTIVITY
done
@j796160836
j796160836 / copyToProject.py
Created Jan 30, 2018
Copy illustrator CC output images to your Android project.
View copyToProject.py
#!/usr/bin/env python
# encoding: utf-8
# ## copyToProject.py
# Copy illustrator CC output images to your Android project.
# ### How to use:
# 1. Put this script at the illustrator CC output folder
# 2. Edit `projectPath` and `targetPrefix` for your want
# For example, we have these files:
@j796160836
j796160836 / update-jenkins.sh
Last active Feb 10, 2019 — forked from lacek/update-jenkins.sh
Update Jenkins on Mac OS X
View update-jenkins.sh
#!/bin/bash
DEFAULT_URL=http://updates.jenkins-ci.org/current/latest/jenkins.war
TMP_PATH=/tmp/jenkins.war
APP_PATH=/Applications/Jenkins/jenkins.war
PLIST_PATH=/Library/LaunchDaemons/org.jenkins-ci.plist
url=${1-$DEFAULT_URL}
echo 'Downloading WAR package...'
@j796160836
j796160836 / namecheap_ddns.py
Last active Jun 16, 2019
Python scripts for update DNS record for Namecheap (DDNS Services update script)
View namecheap_ddns.py
#!/usr/bin/env python
# encoding: utf-8
# Setup introductions:
# Open Namecheap website, select a domain (e.g. abc.com) then go to Advanced DNS
# (Accounts > Domain List > Advanced DNS)
# Insert an "A + Dynamic DNS Record", with hostname (e.g. my) and type whatnever IP address.
# Edit scripts for proper HOSTNAME (e.g. my.abc.com) and APIKEY (Dynamic DNS Password).
# Run and have fun!
@j796160836
j796160836 / namecheap-synology-ddns.php
Last active Oct 27, 2018
Add custom DDNS provider for Namecheap on Synology NAS
View namecheap-synology-ddns.php
#!/usr/bin/php -d open_basedir=/usr/syno/bin/ddns
<?php
/*
Usage Instructions ( Obviously your domain has to be hosted on Namecheap )
1) Copy this file to /usr/syno/bin/ddns/namecheap.php
2) Add the following entry in /etc.defaults/ddns_provider.conf
[Custom - Namecheap]
modulepath=/usr/syno/bin/ddns/namecheap.php
@j796160836
j796160836 / dummy-web-server.py
Created Sep 26, 2017 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
View dummy-web-server.py
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost
You can’t perform that action at this time.