Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -ef
URL=${URL:-http://www.goproblems.com/mkoff/goproblemsSGF.tgz}
WORKDIR=${WORKDIR:-.}
mkdir -p "$WORKDIR"
cd "$WORKDIR"
[[ -s goproblemsSGF.tgz ]] || \
wget "$URL"
@ligi
ligi / html_with_images_gen.sh
Created September 9, 2014 09:06
cucumber html with screenshots generation
#!/bin/bash
mkdir Robotium-Screenshots
cd Robotium-Screenshots
while read str
do
echo "<pre>${str}</pre>"
if [[ $str =~ adb.*-s.*jpg ]]; then
`${BASH_REMATCH[0]}`
@ligi
ligi / gist:a093131d3e4667ec50ed
Created December 9, 2014 14:05
import material design icons
#!/usr/bin/env groovy
def material_home="/home/ligi/git/3rd/material-design-icons/"
def cat=args[0]
def elm=args[1]
["xhdpi","mdpi","hdpi","xxhdpi","xxxhdpi"].each() {
"mkdir drawable-$it".execute()
def cmd="cp $material_home$cat/drawable-$it/$elm"+".png drawable-$it"
println cmd
println cmd.execute()
➜ ~ adb shell pm list packages | grep org.ligi.passandroid
package:org.ligi.passandroid.test
package:org.ligi.passandroid
➜ ~ adb shell run-as org.ligi.passandroid
run-as: Package 'org.ligi.passandroid' is unknown
@ligi
ligi / autospoon.sh
Last active August 29, 2015 14:18
ci spoon script
#!/bin/bash
set +e
download-android
echo y | android update sdk --no-ui --filter android-18 > /dev/null
echo y | android update sdk --no-ui --filter sys-img-armeabi-v7a-android-18 --all > /dev/null
echo no | android create avd --force -n test -t android-18 --abi armeabi-v7a --skin 1280x800
emulator -avd test -no-skin -no-audio -no-window &
@ligi
ligi / mail.txt
Created August 11, 2015 19:24
Pass2U violates PassAndroid GPL
Hi,
We just use part of your code to get airpalne boarding passes.
Others are developed by us. We will remove them in the next
version. Thanks for your notification again.
Pass2U Service Team
2015-08-11 8:50 GMT+08:00 ligi <ligi@ligi.de>:
@ligi
ligi / ImageDiscCache.java
Created February 3, 2012 17:24
DiscCache implementation for com.nostra13.universalimageloader
import java.io.File;
import java.util.Arrays;
import java.util.HashMap;
import com.nostra13.universalimageloader.cache.disc.DiscCache;
/**
* DiscCache implementation that takes care that
* the cache is not growing like cancer
*
* As argument for deleting we use the lastModified TimeStamp
package org.ligi.gpluswall.tv;
import android.app.Activity;
import android.os.Handler;
import android.widget.ProgressBar;
public class ProgressUpdaterThread implements Runnable {
private Handler hndl=new Handler();
private int pause_time;
private long pause_start;
@ligi
ligi / gist:5017133
Created February 22, 2013 22:38
diff to include opml intent-filter for antennapod
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index a0e277a..83cfea2 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -221,8 +221,53 @@
<data android:mimeType="text/xml"/>
</intent-filter>
+
+ <intent-filter>
Categories:Navigation
License:Apache
Web Site:https://github.com/raphaelm/c3nav-android/blob/master/README.md
Source Code:https://github.com/raphaelm/c3nav-android/
Issue Tracker:https://github.com/raphaelm/c3nav-android/issues
Auto Name:C3Nav
Summary:Navigation in C3 events ( 32C3 )
Description:
NoMoKeTo built an indoor router planner tool for the 32nd Chaos Communication Congress that is available at https://c3nav.de