Skip to content

Instantly share code, notes, and snippets.

@filmaj
filmaj / gist:3694793
Created September 10, 2012 23:30 — forked from timkim/gist:3694742
Cordova Android Git Url
git clone https://git-wip-us.apache.org/repos/asf/incubator-cordova-android
cd incubator-cordova-android/framework
android update project -p .
curl -OL http://mirror.symnds.com/software/Apache//commons/codec/binaries/commons-codec-1.6-bin.zip
unzip commons-codec-1.6-bin.zip
cp commons-codec-1.6/commons-codec-1.6.jar libs/.
@filmaj
filmaj / gist:4210194
Created December 4, 2012 23:20
nodejitsu socket hang up
fil-MacBookAir:medic fil$ jitsu deploy
info: Welcome to Nodejitsu filmaj
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in dashboard.js
info: Checking app availability medic
info: Creating app medic
info: Creating snapshot 0.0.4-1
info: Updating app medic
info: Activating snapshot 0.0.4-1 for medic
@filmaj
filmaj / plugin.js
Created July 17, 2013 00:00
drawer plugin brainstorm
function Drawer() {
this.listeners = {
"close":[],
"open":[]
}
var self = this;
cordova.exec(function(evt) {
self.listeners[evt].forEach(function(l) {
l();
});
@filmaj
filmaj / index.html
Created July 31, 2013 23:04
Off the ground with cordova camera in no time
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Hello World</title>
</head>
<body>
<div class="app">
@filmaj
filmaj / host.log
Last active June 2, 2017 05:35
adb output w/ ADB_TRACE=all on an ubuntu host (where it works) compared to inside an LXC on the same host (where it doesn't work)
vagrant@precise64:~$ adb devices
system/core/adb/adb.c::main():Handling commandline()
system/core/adb/adb_client.c::adb_query():adb_query: host:devices
system/core/adb/adb_client.c::_adb_connect():_adb_connect: host:version
system/core/adb/transport.c::writex():writex: fd=3 len=4: 30303063 000c
system/core/adb/transport.c::writex():writex: fd=3 len=12: 686f73743a76657273696f6e host:version
system/core/adb/transport.c::readx():readx: fd=3 wanted=4
system/core/adb/transport.c::readx():readx: fd=3 wanted=4 got=4
4f4b4159 OKAY
system/core/adb/adb_client.c::_adb_connect():_adb_connect: return fd 3
@filmaj
filmaj / directions.md
Last active August 23, 2019 13:36
putting together an lxc for appium on ubuntu

ubuntu lxc

NOTES:

  • p1 referred to below is simply the name given to the LXC. You can change this if you want, just remember to always refer to the same container name :P
  • Only for real devices: make sure that the vendor ID you enter into the android udev rules file matches the device you want to be visible
  1. first, set up vagrant VM to run on a "public network". My Vagrantfile's only network config is:

config.vm.network "public_network", :bridge => 'en0: Wi-Fi (AirPort)'

@filmaj
filmaj / gist:7204612
Created October 28, 2013 21:01
post-refactor fail
DELETE /wd/hub/session/0a09260d-4a98-4d53-bd9a-01d3701586e4 200 3494ms - 89b
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"browserName":"Android","device":"Android","platform":"Mac","version":"7.0","app":"/Users/filmaj/src/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk","app-package":"com.example.android.apis","app-activity":".ApiDemos","launchTimeout":18000,"javascriptEnabled":true}}
info: Using local app from desiredCaps: /Users/filmaj/src/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk
info: Creating new appium session 657c084c-210e-407b-a8f3-863751483caa
info: Starting android appium
debug: Using fast reset? true
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
@filmaj
filmaj / setup.sh
Last active December 29, 2015 12:19
oshi LXC
sudo apt-get update && sudo apt-get -y dist-upgrade
sudo apt-get install -y x11vnc git vim xvfb wget unzip build-essential openjdk-6-jdk python-software-properties python-pip curl python-dev python-openssl python-httplib2 python-pygame python-twisted python-tk unclutter xli ffmpeg transcode tovid libsox-fmt-all flvtool2 tightvncserver
# only if you are on a pre-ubuntu-13 dist: sudo apt-get install -y ia32-libs
apt-get install --no-install-recommends metacity
sudo add-apt-repository ppa:chris-lea/node.js
echo "press enter"
sudo apt-get update
sudo apt-get install -y nodejs
sudo addgroup --gid 2000 chef
sudo adduser --gid 2000 --uid 2000 --disabled-password chef
@filmaj
filmaj / gist:7799342
Created December 5, 2013 02:43
jekyll build time
Filips-MacBook-Air:filmaj.github.com filmaj$ time jekyll build
Configuration file: /Users/filmaj/src/filmaj.github.com/_config.yml
Source: /Users/filmaj/src/filmaj.github.com
Destination: /Users/filmaj/src/filmaj.github.com/_site
Generating... done.
real 0m4.516s
user 0m1.002s
sys 0m1.543s
@filmaj
filmaj / changes.sh
Created January 9, 2014 22:33
hardware support on sauce
sudo apt-get install usbutils
echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18d1\", MODE=\"0666\", GROUP=\"plugdev\"" > /etc/udev/rules.d/51-android.rules
# full list of vendor ids: http://developer.android.com/tools/device.html#VendorIds
# maybe we have our udev rules file include all of them for simplicity?
sudo chmod a+r /etc/udev/rules.d/51-android.rules