Skip to content

Instantly share code, notes, and snippets.

View dino-su's full-sized avatar

Dino Su dino-su

View GitHub Profile
@dino-su
dino-su / AddPage.java
Last active August 24, 2021 10:56
Android UiAutomator in Page Object Pattern
package com.uia.example.my;
import com.android.uiautomator.core.UiDevice;
import com.android.uiautomator.core.UiObject;
import com.android.uiautomator.core.UiObjectNotFoundException;
import com.android.uiautomator.core.UiScrollable;
import com.android.uiautomator.core.UiSelector;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
public class AddPage extends UiAutomatorTestCase {
@dino-su
dino-su / README.md
Created November 14, 2014 15:27
Page Object Model in Python
@dino-su
dino-su / README.md
Last active December 16, 2015 07:13
NODE_ENV

$ node index.js // local url

$ NODE_ENV=heroku node index.js // heroku url

@dino-su
dino-su / comp.js
Created December 19, 2015 09:27
EventEmitter in composition way.
'use strict';
var EventEmitter = require('events').EventEmitter;
var bot = {
sayHi: function(name) {
console.log('hi ' + name);
},
emitter: new EventEmitter()
};
### Performance
# The values for the following options are dependent on the system's hardware
# and Internet connection speed. To find the optimal values read:
# Optimize Your BitTorrent Download Speed.
min_peers = 40
max_peers = 52
min_peers_seed = 10
max_peers_seed = 52
@dino-su
dino-su / README.md
Last active January 7, 2016 07:32
Selenium Bootstrap

Test with Firefox

$ BROWSER=firefox mocha selenium.js

Test with Chrome

$ BROWSER=chrome mocha selenium.js

@dino-su
dino-su / README.md
Last active March 4, 2016 06:17
Running Monkey in client-server model.

Setup port forwarding

$ adb forward tcp:1080 tcp:1080

Start the monkey server

$ adb shell monkey --port 1080

Run Commands

$ telnet localhost 1080
tap 150 200
@dino-su
dino-su / avconv_examples.sh
Last active June 18, 2016 10:09 — forked from romuloceccon/avconv_examples.sh
avconv command lines to reduce video size
# https://trac.ffmpeg.org/wiki/Encode/H.264
# https://trac.ffmpeg.org/wiki/Encode/AAC
# -map 0 -c copy: copy all remaining streams
# -pix_fmt yuv420p: be compatible with most players
# high quality video, high quality audio
avconv -i input.mov -map 0 -c copy -c:v libx264 -preset veryslow -pix_fmt yuv420p -crf 17 -c:a libfdk_aac -vbr 4 output.mov
# high quality *compatible* full-hd video, high quality audio