This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GITEA_API=http://sgsxdev005.isng.intel.com:6998/api/v1 | |
GITEA_TOKEN=xxxx24939dc220dc7fc65c04d5ee9f04f5exxxx | |
page=1 | |
while true; do | |
JSON=$(curl -X GET "$GITEA_API/repos/search?uid=2&mode=mirror&page=${page}&limit=512&access_token=$GITEA_TOKEN" -H "accept: application/json") | |
NEWREPO=$(echo $JSON | python2 -c "import sys, json; print ' '.join([str(p['name']) for p in json.load(sys.stdin)['data']])") | |
[ -z "$NEWREPO" ] && break | |
REPOS+=" "$NEWREPO | |
(( page++ )) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# repo forall -c /path/to/migrate.sh | |
GITEA_REPO=/local/yinli/repos/mirror | |
GITEA_API=http://sgsxdev005.isng.intel.com:6998/api/v1 | |
GITEA_TOKEN=xxxx24939dc220dc7fc65c04d5ee9f04f5exxxx | |
REMOTE_URL=https://gts-chd.intel.com/scm | |
REMOTE_PASS="password" | |
REMOTE_USER="yinli" | |
migrate() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}", | |
"profiles": | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<receiver android:name=".BtPanStateReceiver"> | |
<intent-filter> | |
<action android:name="android.bluetooth.pan.profile.action.CONNECTION_STATE_CHANGED" /> | |
</intent-filter> | |
</receiver> | |
<service android:name=".BtPanStateReceiver$BtPanService" android:exported="false"></service> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new-instance v0, Ljava/lang/StringBuilder; | |
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V | |
const-string v1, "addLinkAddress: " | |
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
move-result-object v0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static private void enableSoftAP(Context context) { | |
try { | |
WifiManager wifiManager; | |
WifiConfiguration config = null; | |
wifiManager = (WifiManager)context.getSystemService(Context.WIFI_SERVICE); | |
Method method = wifiManager.getClass().getMethod("setWifiApEnabled", | |
WifiConfiguration.class, Boolean.TYPE); | |
method.invoke(wifiManager, config, true); | |
} catch (NoSuchMethodException e) { | |
e.printStackTrace(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
branches=$(git branch -r | grep -v "origin/tags" | grep -v "trunk" | sed 's/origin\///') | |
for branch in $branches; do | |
git branch $branch refs/remotes/origin/$branch | |
done | |
tags=$(git branch -r | grep "origin/tags" | sed 's/origin\/tags\///') | |
for tag in $tags; do | |
git tag -a -m "tags from SVN" $tag refs/remotes/origin/tags/$tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo x11vnc -auth /var/lib/lightdm/.Xauthority -display :0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo init -u https://android.googlesource.com/platform/manifest --reference=/var/aosp -b android-6.0.0_r1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install ant | |
mkdir $HOME/webrtc && cd $_ | |
export GYP_DEFINES="OS=android build_with_libjingle=1 build_with_chromium=0 libjingle_java=1 enable_tracing=1" | |
fetch webrtc_android | |
cd src | |
./build/install-build-deps-android.sh | |
gclient runhooks | |
. build/android/envsetup.sh | |
ninja -C out/Debug AppRTCDemo |