Skip to content

Instantly share code, notes, and snippets.

@i-sync
i-sync / ImportWizardFromCSV.ps1
Created February 19, 2022 13:14 — forked from michaellwest/ImportWizardFromCSV.ps1
Import content from a CSV using Sitecore PowerShell Extensions.
<#
.SYNOPSIS
Data Import Wizard provides a way to generate or update content from an external file.
.DESCRIPTION
The import file uses the properties "Name" and "Id" to help match existing items.
.NOTES
Requires Sitecore PowerShell Extensions 4.6 or newer.
@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 / 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 / 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 / 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",
#!/bin/bash
ADBShell () { adb ${2+-s }$2 shell "$1" | tr -d '\r'
}
GetAndroidVersion () {
local ALL_TAGS=$(wget -qO - "$GOOGLE_SOURCE/$REPO/+refs/tags/?format=text" | \
tr -d '^{}' | cut -d/ -f3 | sort -u | grep -vE -- '-(cts|sdk)-' | grep -v "_r0")
TAG=${1:-$(ADBShell 'getprop ro.build.version.release')}
echo -e "ANDROID_SERIAL=$ANDROID_SERIAL\nro.build.version.release=$TAG" 1>&2
#!/bin/bash
ADBShell () { adb ${2+-s} $2 shell "$1" | tr -d '\r'
}
GetAndroidVersion () {
GOOGLE_SOURCE="https://android.googlesource.com"
REPO="platform/frameworks/base"
ALL_TAGS=$(wget -qO - "$GOOGLE_SOURCE/$REPO/+refs/tags/?format=text" | \
tr -d '^{}' | cut -d/ -f3 | sort -u | grep -vE -- '-(cts|sdk)-' | grep -v "_r0")