Skip to content

Instantly share code, notes, and snippets.

View chihchun's full-sized avatar
🎯
Focusing

Rex Tsai chihchun

🎯
Focusing
View GitHub Profile
#!/bin/sh
# A script for access console and log the output.
# A script for access console and log the output.
# Usage:
# $ DEVICE=/dev/ttyUSB0 SPEED=51200 kermit.sh
#
# Copyright (c) Rex Tsai <chihchun@kalug.linux.org.tw>
# $Id: $
# SPEED=9600
@chihchun
chihchun / -
Created August 29, 2015 09:36
I/ActivityManager( 1055): Start proc 11749:flipboard.app/u0a764 for activity flipboard.app/flipboard.activities.LaunchActivityAlias
E/JavaBinder(11749): !!! FAILED BINDER TRANSACTION !!!
D/AndroidRuntime(11749): Shutting down VM
E/flip (11749): [ERROR:3] android.os.TransactionTooLargeException: null
E/flip (11749): android.os.BinderProxy.transactNative(Native Method)
E/flip (11749): android.os.BinderProxy.transact(Binder.java:496)
E/flip (11749): android.content.pm.IPackageManager$Stub$Proxy.queryIntentActivities(IPackageManager.java:2579)
E/flip (11749): android.app.ApplicationPackageManager.queryIntentActivitiesAsUser(ApplicationPackageManager.java:566)
E/flip (11749): android.app.ApplicationPackageManager.queryIntentActivities(ApplicationPackageManager.java:558)
E/flip (11749): flipboard.service.FlipboardManager.Q(FlipboardManager.java:4023)
<metadata>
<desc>路線名稱</desc>
<author>
<name>Rex Tsai</name>
<email id="rex.cc.tsai" domain="gmail.com"/>
</author>
<copyright author="Rex Tsai">
<year>2013</year>
<license>http://creativecommons.org/licenses/by-sa/2.5</license>
</copyright>
@chihchun
chihchun / checkout.sh
Last active August 29, 2015 13:57
Script for checkout all source code of current Ubuntu packages.
#!/bin/bash
# Script for checkout all source code of current Ubuntu packages.
# Usage: dpkg-query -f '${Package} ${Source}\n' -W | $0
# Author: Rex Tsai <rex.cc.tsai@gmail.com>
# codename can be trusty, precise, etc.
codename=
# bzr or "git-bzr"
vcs="git-bzr"
$ curl -v http://is.gd/fdjqWx
* About to connect() to is.gd port 80 (#0)
* Trying 89.200.143.50... connected
> GET /fdjqWx HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1c zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: is.gd
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Server: nginx
@chihchun
chihchun / bsdscript-timing.pl
Last active August 29, 2015 14:01
print timing & log line by line
#!/usr/bin/perl -w
# https://unix.stackexchange.com/questions/27282/how-to-use-scriptreplay
use strict;
$|=1;
open (TIMING, shift)
or die "cannot read timing info: $!";
open (TYPESCRIPT, shift || 'typescript')
or die "cannot read typescript: $!";
my $divisor=shift || 1;
my $start_sec=shift || 0;
@chihchun
chihchun / phablet-debug.sh
Created May 13, 2014 11:11
script to log everything when debugging ubuntu touch
!/bin/bash
tmpdir=$(mktemp -d /tmp/ubuntutouch-$(date +"%Y%m%d%H%M")-XXX)
LANG=en_US.UTF8
PS1="$ "
export PS1
adb wait-for-device
Carrier: 中華電信 (46692)
Roaming: Not roaming
Type: GSM
Device: LGE Nexus 5 (Google)
Location Area Code: 11401
Cell ID: 54027031
Cell level: 4
Cell signal strength: -81 dBm
Cell timing advance: 2147483647
Cell identity: 3386317
import QtQuick 2.0
Rectangle {
id: page
width: 600; height: 500
color: "lightgray"
FontLoader { id: testFont; source: "/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf" }
Text {
font.family: testFont.name
font.pointSize: 26
@font-face{
font-family:"Ubuntu";
src:url("../fonts/Ubuntu-L.woff") format('woff');
font-weight:300
}
@font-face{
font-family:"Ubuntu";
src:url("../fonts/Ubuntu-R.woff") format('woff');