Skip to content

Instantly share code, notes, and snippets.

View koush's full-sized avatar

Koushik Dutta koush

View GitHub Profile
ArrayList<WeakReference<ContentObserver>> observers = new ArrayList<WeakReference<ContentObserver>>();
public void loadCursor(final BetterCursorAdapter adapter, final Uri uri, final String[] projection, final String selection, final String[] selectionArgs, final String sortOrder) {
final FutureCallback<BetterCursorAdapter> callback = new FutureCallback<BetterCursorAdapter>() {
@Override
public void onCompleted(Exception e, BetterCursorAdapter result) {
if (e != null)
return;
View view = getView();
if (view == null)
root@dc4a7e30c4fa:/publicsuffix-list# make test
cd linter; \
./pslint_selftest.sh; \
./pslint.py ../public_suffix_list.dat;
test_NFKC: OK
test_allowedchars: OK
test_dots: OK
test_duplicate: OK
test_exception: OK
test_punycode: OK
koush@Koushik-MacStudio docker % git diff b61b14f9d3c05b1fe9e464e824bdb7006a1544cc install-scrypted-dependencies-win.ps1
diff --git a/docker/install-scrypted-dependencies-win.ps1 b/docker/install-scrypted-dependencies-win.ps1
index 9360fffe..f22200cd 100644
--- a/docker/install-scrypted-dependencies-win.ps1
+++ b/docker/install-scrypted-dependencies-win.ps1
@@ -1,18 +1,26 @@
+# Set-PSDebug -Trace 1
+
+# stop existing service if any
+sc.exe stop scrypted.exe
@koush
koush / .bash_profile
Last active February 23, 2022 23:54
Put this in your .bash_profile(s) to open VS Code on your local machine while SSH'd into a remote machine.
# this needs to be on the *remote* machine.
if [ ! -z "$SSH_CLIENT" ]
then
function code() {
local ssh_client_host=$(echo $SSH_CLIENT | cut -d ' ' -f1)
if [ -z "$1" ]
then
local argpath="."
v=0
o=- 0 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 2 1
a=msid-semantic: WMS 6568278481264718712/957525535 virtual-6666
a=ice-lite
m=audio 19305 UDP/TLS/RTP/SAVPF 111
c=IN IP4 74.125.197.127
a=rtcp:9 IN IP4 0.0.0.0
[dalvik.vm.dexopt-flags]: [m=y]
[dalvik.vm.heapgrowthlimit]: [64m]
[dalvik.vm.heapsize]: [256m]
[dalvik.vm.heapstartsize]: [8m]
[dalvik.vm.stack-trace-file]: [/data/anr/traces.txt]
[debug.hwui.render_dirty_regions]: [false]
[dev.MDPLimitCondition]: [0]
[dev.bootcomplete]: [1]
[dev.kiessupport]: [TRUE]
[dhcp.wlan0.dns1]: [192.168.1.1]
const fs = require('fs');
var f = fs.readFileSync('test.ts')
var offset = 0
var pids = {}
// var fout = fs.openSync("check-trim.ts", "w")
var incompleteTypes = {
video: 0,
const fs = require('fs');
var f = fs.readFileSync('check.ts')
var offset = 0
var pids = {}
// var fout = fs.openSync("check-trim.ts", "w")
var incompleteTypes = {
video: 0,
const fs = require('fs');
var f = fs.readFileSync('check.ts')
var offset = 0
var pids = {}
// var fout = fs.openSync("check-trim.ts", "w")
var incompleteTypes = {
video: 0,
import * as std from 'std';
import * as os from 'os';
function getCallingScript(depth) {
depth = depth || 0;
try {
throw new Error();
}
catch (e) {
try {