Skip to content

Instantly share code, notes, and snippets.

View stormzhang's full-sized avatar

stormzhang stormzhang

View GitHub Profile
/*
* Copyright (C) 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2013 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@stormzhang
stormzhang / adbwifi.sh
Created August 28, 2014 00:52
shell script for adb wifi
#!/bin/bash
#Modify this with your IP range
MY_IP_RANGE="192\.168\.1"
#You usually wouldn't have to modify this
PORT_BASE=5555
#List the devices on the screen for your viewing pleasure
adb devices
@stormzhang
stormzhang / ViewFinder.java
Last active May 4, 2016 10:22
Helper for finding and tweaking a view's children
/*
* Created by Storm Zhang 2014-8-24.
*/
package com.storm.library;
import android.app.Activity;
import android.content.res.Resources;
import android.view.View;
import android.view.View.OnClickListener;
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@stormzhang
stormzhang / time_zone_io.md
Created November 13, 2012 14:23 — forked from wdiechmann/time_zone_io.md
time and time again, your rails will come clean :)

Started out with what that frustrating issue that bites many a Rails developer (judging from just a tad over 24hrs googling and reading blogs etc) - time_zone! I'm on ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.4.2] - Rails 3.2.8 config.time_zone = 'Copenhagen'

and initially, I wanted to bark up this three, 'with the pack'

[31] pry(main)> ent.enter_at=Time.now 
=> 2012-11-13 11:52:45 +0100
[32] pry(main)> ent.save