Skip to content

Instantly share code, notes, and snippets.

View westlinkin's full-sized avatar
🎯
Focusing

Wesley Lin westlinkin

🎯
Focusing
View GitHub Profile
03-24 11:39:21.264 27262-27262/com.ihanghai.cc_go D/HeadMountedDisplayManager: Cardboard screen parameters file not found: java.io.FileNotFoundException: /storage/emulated/0/Cardboard/phone_params: open failed: ENOENT (No such file or directory)
03-24 11:39:21.269 27262-27262/com.ihanghai.cc_go I/HeadMountedDisplayManager: Successfully read device params from external storage
03-24 11:39:21.269 27262-27262/com.ihanghai.cc_go D/CardboardViewNativeImpl: NativeProxy not found
03-24 11:39:21.269 27262-27262/com.ihanghai.cc_go D/CardboardViewNativeImpl: Loading native library vrtoolkit
03-24 11:39:21.269 27262-27262/com.ihanghai.cc_go D/CardboardViewNativeImpl: Native library loaded
03-24 11:39:21.289 27262-27262/com.ihanghai.cc_go W/art: Attempt to remove non-JNI local reference, dumping thread
03-24 11:39:21.308 27262-27262/com.ihanghai.cc_go I/Rajawali: Rajawali | Bombshell | v1.1 Development
03-24 11:39:21.308 27262-27262/com.ihanghai.cc_go I/Rajawali: THIS IS A DEV BRANCH CONTAINING SIGNIFICANT CHANGES. PLEA
@westlinkin
westlinkin / MTStatusBarOverlay.m
Created January 18, 2016 07:17
A little weak of MTStatusBarOverlay to support iOS 9 and above
//
// MTStatusBarOverlay.m
//
// Created by Matthias Tretter on 27.09.10.
// Copyright (c) 2009-2011 Matthias Tretter, @myell0w. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@westlinkin
westlinkin / ExtAudioRecorder
Created August 21, 2013 08:07
record audio and save as .wav
package com.ihanghai.googlesearch
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.media.MediaRecorder.AudioSource;
05-24 11:43:33.051: D/AmazonMobileAds AdLocation(18708): Failed to retrieve GPS location: No permissions to access GPS
05-24 11:43:33.051: D/AmazonMobileAds AdLocation(18708): Failed to retrieve network location: No permissions to access network location
05-24 11:43:33.059: D/AmazonMobileAds AdRequest(18708): Generated AAX url: http://aax-us-east.amazon-adsystem.com/x/msdk?appId=90b4b384c90a408f98c461986ba0dc20&sz=300x250&slot=landscape&ua=Mozilla%2F5.0%20%28Linux%3B%20U%3B%20Android%204.0.3%3B%20en-us%3B%20KFTT%20Build%2FIML74K%29%20AppleWebKit%2F534.30%20%28KHTML%2C%20like%20Gecko%29%20Version%2F4.0%20Safari%2F534.30&adsdk=amznAdSDK-android-4.3.17&dinfo=%7B%22scalingFactor%22%3A%221.5%22%2C%22screenSize%22%3A%221280x800%22%2C%22orientation%22%3A%22landscape%22%2C%22os%22%3A%22Android%22%2C%22model%22%3A%22KFTT%22%2C%22osVersion%22%3A%224.0.3%22%2C%22connectionType%22%3A%22Wifi%22%2C%22language%22%3A%22en%22%2C%22make%22%3A%22Amazon%22%2C%22country%22%3A%22US%22%7D&pkg=%7B%22v%22%3A%2218%22%2C%22lbl%22%3A%22
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/btn_share_press"/>
<item android:state_selected="true" android:drawable="@drawable/btn_share_press"/>
<item android:state_focused="true" android:drawable="@drawable/btn_share_press"/>
@westlinkin
westlinkin / gist:4617409
Created January 24, 2013 03:31
kindle fire full screen
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_video_play);
setFullScreen();
}
private void setFullScreen(){
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
@westlinkin
westlinkin / gist:4045540
Created November 9, 2012 12:54
goagent error
NFO - [Nov 09 20:52:01] Enable aggressive create_ssl_connection to connect google_hk
Traceback (most recent call last):
File "proxy.py", line 1816, in <module>
main()
File "proxy.py", line 1811, in main
server = gevent.server.StreamServer((common.LISTEN_IP, common.LISTEN_PORT), gaeproxy_handler)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 408, in __init__
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 419, in server_bind
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
socket.error: [Errno 48] Address already in use
@westlinkin
westlinkin / gist:4045515
Created November 9, 2012 12:46
goagent error
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
File "uploader.zip/__main__.py", line 10, in <module>
File "uploader.zip/__main__.py", line 5, in main
File "uploader.zip/appcfg.py", line 13, in <module>