Skip to content

Instantly share code, notes, and snippets.

PhantomJS 2.1.1 (Linux 0.0.0) OCA.Files.FileList tests loading file list scroll distance is read from sessionStorage FAILED
TypeError: null is not an object (evaluating 'getItemStub.getCall(0).args') in /var/www/html/owncloud/apps/files/tests/js/filelistSpec.js (line 1391)
/var/www/html/owncloud/apps/files/tests/js/filelistSpec.js:1391:33
@pellaeon
pellaeon / cloudconfig.txt
Created August 7, 2016 07:16
pellaeon's cloudconfig
#cloud-config
apt_mirror: http://ubuntu.cs.nctu.edu.tw/ubuntu/
timezone: Asia/Taipei
package_upgrade: true
packages:
- mosh
- git
- screen
- htop
@pellaeon
pellaeon / hidemyass.js
Last active July 3, 2017 22:33
Get proxy list from various sites
// open http://proxylist.hidemyass.com/search-1292985 and
// run following code in browser developer console
aaa = '';
$('table#listable > tbody > tr').each(function(index){
text = $(this)[0].innerText;
textarr = text.split(/\s+/);
proxystr = textarr[2].concat(":",textarr[3]);
//console.log(proxystr);
aaa = aaa.concat(proxystr, "\n");
});
@pellaeon
pellaeon / iptables_custom.sh
Created May 1, 2017 05:48
Allow traffic of apps in work profile to pass, set this as AFWall custom script
IP6TABLES=/system/bin/ip6tables
IPTABLES=/system/bin/iptables
$IPTABLES -A afwall-3g-home -m owner --uid-owner 1010082 -j RETURN
$IPTABLES -A afwall-3g-home -m owner --uid-owner 1010105 -j RETURN
$IPTABLES -A afwall-3g-home -m owner --uid-owner 1010172 -j RETURN
$IPTABLES -A afwall-wifi-wan -m owner --uid-owner 1010082 -j RETURN
$IPTABLES -A afwall-wifi-wan -m owner --uid-owner 1010105 -j RETURN
$IPTABLES -A afwall-wifi-wan -m owner --uid-owner 1010172 -j RETURN
@pellaeon
pellaeon / With patch
Created May 21, 2017 08:57
Gluster volume process GDB output
(gdb) set follow-fork-mode child
(gdb) set breakpoint pending on
(gdb) b compat.c:extattr_list_reshape
Breakpoint 1 at 0x80088eda7: file compat.c, line 548.
(gdb) b compat.c:551
Breakpoint 2 at 0x80088edba: file compat.c, line 551.
(gdb) b sys_llistxattr
Breakpoint 3 at 0x8008959b1: file syscall.c, line 433.
(gdb) b sys_flistxattr
Breakpoint 4 at 0x800895aca: file syscall.c, line 552.
@pellaeon
pellaeon / jenkins build script
Created November 18, 2017 05:34
鳳梨酥計劃
#!/usr/local/bin/bash
set -ex
BSDINIT_DIR="$JENKINS_HOME/workspace/bsd-cloudinit/bsd-cloudinit_master"
BSDINSTALLER_DIR="$JENKINS_HOME/workspace/bsd-cloudinit/bsd-cloudinit-installer_master"
TEST_DIR="$BSDINSTALLER_DIR/test"
TEST_IMG="$TEST_DIR/tester.raw"
pellaeon@apua-ubuntu1604-desktop:~$ sudo snap anbox stop
[sudo] password for pellaeon:
error: unknown command "anbox", see "snap --help"
pellaeon@apua-ubuntu1604-desktop:~$ sudo snap stop anbox
Stopped.
pellaeon@apua-ubuntu1604-desktop:~$ anbox container-manager --help
NAME:
container-manager - Start the container manager service
USAGE:
@pellaeon
pellaeon / dont-check-pref-hash.patch
Created November 3, 2018 16:31
Patch PrefHashStoreImpl::PrefHashStoreTransactionImpl::CheckValue
# https://github.com/Eloston/ungoogled-chromium/issues/538
--- services/preferences/tracked/pref_hash_store_impl.cc 2018-11-03 23:30:48.000000000 +0800
+++ services/preferences/tracked/pref_hash_store_impl.cc 2018-11-03 23:34:27.000000000 +0800
@@ -156,33 +156,7 @@
ValueState PrefHashStoreImpl::PrefHashStoreTransactionImpl::CheckValue(
const std::string& path,
const base::Value* initial_value) const {
- std::string last_hash;
- contents_->GetMac(path, &last_hash);
-
@pellaeon
pellaeon / default.custom.yaml
Last active January 19, 2019 04:56
Rime default.yaml
patch:
schema_list:
- schema: luna_pinyin_tw
- schema: luna_pinyin
- schema: luna_pinyin_fluency
- schema: luna_pinyin_simp
"key_binder/bindings":
# Emacs style
- { when: composing, accept: Control+p, send: Up }
- { when: composing, accept: Control+n, send: Down }
@pellaeon
pellaeon / 1.log
Created February 3, 2019 09:29
LOS 15.1 gallery cannot view photo
02-03 17:22:22.355 2921 3087 I Camera3-Device: disconnect: E [35/1836]
02-03 17:22:22.356 2921 3087 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1
02-03 17:22:22.357 2921 3087 I CameraService: disconnect: Disconnected client for camera 0 for PID 12614 02-03 17:22:22.358 12614 12700 W zygote : Long monitor contention with owner CameraDeviceHandler (12668) at void android.hardware.camera2.impl.CameraDeviceImpl.close()(CameraDeviceImpl.java:1046) waiters=0 in void android.hardware.camer$
2.impl.CameraDeviceImpl$CameraDeviceCallbacks.onCaptureStarted(android.hardware.camera2.impl.CaptureResultExtras, long) for 1.085s
02-03 17:22:22.366 12614 12659 W NdkImageReader: A f