This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-> ice ~ % adb shell input | |
Usage: input [<source>] <command> [<arg>...] | |
The sources are: | |
mouse | |
keyboard | |
joystick | |
touchnavigation | |
touchpad | |
trackball |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Send power button press if screen is off | |
(adb shell dumpsys power | grep -q "Display Power: state=OFF" ) && adb shell input keyevent KEYCODE_POWER | |
# Send menu key press to unlock | |
adb shell input keyevent 82 | |
# Even if failed let the gradle build continue | |
true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/clojure | |
; Created: Fri Jan 9 16:10:56 EET 2015 | |
; encoding: utf-8 | |
(defn burrows-wheeler [s] | |
(let [size (count s)] | |
(->> | |
(repeat 2 s) | |
(apply str) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/clojure | |
; Created: Fri Jan 9 16:10:56 EET 2015 | |
; encoding: utf-8 | |
(defn burrows-wheeler [s] | |
(let [size (count s)] | |
(->> | |
(repeat size s) | |
(apply str) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns com.mlatu.clojure.test.main | |
(:use [neko.activity :only [defactivity set-content-view! *a]] | |
[neko.threading :only [on-ui]] | |
[neko.notify] | |
[neko.resource])) | |
(fire (*a) :notification | |
(notification :icon (get-resource (*a) :drawable :ic-launcher) | |
:ticker-text "You've got mail" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>My first Three.js app</title> | |
<style> body { margin: 0; } canvas { width: 100%; height: 100% } </style> | |
<script src="js/three.min.js"></script> | |
<script src="js/TrackballControls.js"></script> | |
</head> | |
<body> | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int W = 1024; | |
int H = 700; | |
float K1 = 0.4; | |
float K2 = 0.6; | |
float LEN_DEC1 = 0.66; | |
float LEN_DEC2 = 0.5; | |
float ANGLE1 = PI/6; | |
float ANGLE2 = -PI/6; | |
int STEPS = 14; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String getRawResource(int resource) { | |
String res = null; | |
InputStream is = getContext().getResources().openRawResource(resource); | |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
byte[] b = new byte[1]; | |
try { | |
while ( is.read(b) != -1 ) { | |
baos.write(b); | |
}; | |
res = baos.toString(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Insert current date in Google Spreadsheet | |
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
// Or FormApp or SpreadsheetApp. | |
ui.createMenu('Custom Menu') | |
.addItem('Insert Date', 'insertDate') | |
.addToUi(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------- | |
-- Copyright (c) 2010-2011 Zipline Games, Inc. | |
-- All Rights Reserved. | |
-- http://getmoai.com | |
---------------------------------------------------------------- | |
MOAISim.openWindow ( "test", 320, 480 ) | |
viewport = MOAIViewport.new () | |
viewport:setSize ( 320, 480 ) |