Skip to content

Instantly share code, notes, and snippets.

@i-sync
i-sync / MultiRootTreeList.cs
Created November 2, 2021 03:51 — forked from kamsar/MultiRootTreeList.cs
Multi-Root TreeList
using System;
using System.Linq;
using Sitecore.Diagnostics;
using Sitecore.Globalization;
using Sitecore.Shell.Applications.ContentEditor;
using Sitecore.Text;
using Sitecore.Web;
using Sitecore.Web.UI.HtmlControls;
using Sitecore.Web.UI.WebControls;
@i-sync
i-sync / unblock163.sh
Created October 17, 2021 02:32
Unblock163 autoscripts
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
# --------------------------------------------------------------
# 系统: CentOS/Debian/Ubuntu
# 项目: 解锁网易云音乐
# 版本: 1.1.5
# 作者: XIU2
# 官网: https://shell.xiu2.xyz
# 项目: https://github.com/XIU2/Shell
@i-sync
i-sync / Dueros-Developer-Name-Updated.js
Created February 4, 2021 16:38
Dueros Developer Name Updated - Tampermonkey Script
// ==UserScript==
// @name Dueros Developer Name Updated
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Mike
// @run-at document-start
// @match https://dueros.baidu.com/dbp/bot/index
// @require https://unpkg.com/[email protected]/dist/ajaxhook.min.js
// @grant MIT
@i-sync
i-sync / AutoReinstall.sh
Created January 30, 2021 17:21
DD scripts backup
#!/bin/sh
if [[ $EUID -ne 0 ]]; then
clear
echo "Error: This script must be run as root!" 1>&2
exit 1
fi
function CopyRight() {
clear
@i-sync
i-sync / com.ihuman.hpfutility.net.d.c.java
Last active January 21, 2021 17:08
iHuman Android application API signature parameter algorithm - ihuman.apk.2.0.1
package com.ihuman.hpfutility.net.d;
import android.text.TextUtils;
import android.util.Pair;
import cn.jiguang.net.HttpUtils;
import com.google.devtools.build.android.desugar.runtime.ThrowableExtension;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@i-sync
i-sync / nfs_automount.sh
Created December 20, 2019 06:43 — forked from aldur/nfs_automount.sh
Mount an NFS share on Android
#!/bin/sh
# Mount an NFS share on Android
# Requirements:
# - Busybox
# - A kernel supporting nfs (either built-in or as a module)
# On my Nexus 7 2012 I use the following kernel:
# http://forum.xda-developers.com/showthread.php?t=2107224
# Remember: if you have problems of system space, simply delete some of the default stuff.
@i-sync
i-sync / test.py
Created December 19, 2019 08:29
testing
import time
from test1 import result as add1
from test2 import result as add2
t1 = time.time()
for i in range(1000000):
add1(i)
t1 = time.time() - t1
print(t1)
@i-sync
i-sync / MediaDecoder.java
Created December 16, 2019 15:24 — forked from a-m-s/MediaDecoder.java
Android code to extract raw audio from arbitrary media files.
/* MediaDecoder
Author: Andrew Stubbs (based on some examples from the docs)
This class opens a file, reads the first audio channel it finds, and returns raw audio data.
Usage:
MediaDecoder decoder = new MediaDecoder("myfile.m4a");
short[] data;
while ((data = decoder.readShortData()) != null) {
@i-sync
i-sync / supervisor-voice.watch.conf
Created October 6, 2019 08:40
voice check for telegram
[program:voice-producor]
command=/home/pi/voice/voice-producor.sh
user=pi
stderr_logfile=/home/pi/voice/voicep.log
stdout_logfile=/home/pi/voice/voicep.log
stopasgroup=true
stopsignal=QUIT
[program:voice-consumer]
command=/home/pi/voice/voice-consumer.sh
@i-sync
i-sync / v2ray-as-ss-over-v2plugin-server-config.json
Created October 4, 2019 10:13 — forked from icpz/v2ray-as-ss-over-v2plugin-server-config.json
`shadowsocks over v2ray-plugin' as client work with `v2ray' as server
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "info"
},
"inbounds": [
{
"port": "10000", /* this is the server port for client */
"listen": "127.0.0.1",