Skip to content

Instantly share code, notes, and snippets.

ul.loading li{
list-style:none;
width:3px;
height:3px;
display:inline-block;
background:#fff;
position:absolute;
margin-left:-5%;
top:85px;
animation-name:loading;
@ljanzik
ljanzik / 1.js
Created November 28, 2014 20:50
Wann ist eine CSS Transition vorbei?
$('#box').click(function() {
$('#box').animate({
marginLeft: '200'
}, 5000, function() {
alert("Animation vorbei");
});
});
public class DbHelper extends SQLiteOpenHelper {
@Override
public void onCreate(SQLiteDatabase db) {
//Datenbank initialisieren
[...]
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
Log.d("DbHelper", "Hier ist nix zu sehen");
@ljanzik
ljanzik / designer.html
Created August 27, 2014 09:01
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
@ljanzik
ljanzik / LogAndTrackAspect.java
Created February 15, 2014 05:47
Simple Demo for the usage of AspectJ
/**
* log before an activity is created
*
* @param joinPoint aspectj JoinPoint
*/
@Before("execution(* android.app.Activity.onCreate())")
public void logActivityCreated(final JoinPoint joinPoint) {
Log.d(TAG, "Creating Activity: " + joinPoint.getTarget().getClass().getSimpleName());
}
@ljanzik
ljanzik / pom-incomplete.xml
Last active December 21, 2015 05:58
Maven Configuration for Xcode Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.thoughtsonmobile.ios</groupId>
<artifactId>maven-test</artifactId>
<version>1.0-SNAPSHOT</version>
</project>
@ljanzik
ljanzik / ActivityInjectionAspect.java
Last active December 20, 2015 01:29
SImple example for View Injection for a Android Application by using AspectJ
@Aspect
public class ActivityInjectionAspect {
@Before("execution(* android.app.Activity.onCreate(..)) && within(@com.thoughtsonmobile.example.aspectj.Layout *)")
public void beforeOnCreate(JoinPoint joinPoint) {
Activity activity = (Activity)joinPoint.getTarget();
Layout layout = activity.getClass().getAnnotation(Layout.class);
activity.setContentView(layout.value());
}
@ljanzik
ljanzik / BuildConfig.java
Last active December 19, 2015 04:18
BuildConfig Constants
public final class BuildConfig {
public final static boolean DEBUG = true;
public final static String BACKEND_URL = "http://dev.thoughtsonmobile.com";
}
@ljanzik
ljanzik / calabash.sh
Created February 13, 2013 13:56
Run Calabash-Tests on Device
NO_LAUNCH=1 DEVICE_ENDPOINT=http://111.111.111.111:37265 cucumber