Method 1
$ adb shell "setprop persist.sys.language zh; setprop persist.sys.country TW; setprop ctl.restart zygote"
Method 2
#!/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 |
#!/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: |
#!/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...' |
#!/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! |
#!/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 |
#!/usr/bin/env python | |
""" | |
Very simple HTTP server in python. | |
Usage:: | |
./dummy-web-server.py [<port>] | |
Send a GET request:: | |
curl http://localhost |
#!/bin/bash | |
function getUDID { | |
udid=($(system_profiler SPUSBDataType | grep -A 11 -w "iPad\|iPhone\|iPad" | grep "Serial Number" | awk '{ print $3 }')) | |
if [ -z $udid ]; then | |
echo "No device detected. Please ensure an iOS device is plugged in." | |
exit 1 | |
else | |
for i in "${udid[@]}"; do | |
echo -n $i | pbcopy |