Skip to content

Instantly share code, notes, and snippets.

@pocmo
pocmo / ViewPagerAdapter.java
Created Oct 21, 2012
ViewPagerAdapter: Implementation of PagerAdapter that represents each page as a View
View ViewPagerAdapter.java
/*
* Copyright (C) 2012 Sebastian Kaspari
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jhankin
jhankin / SOInsetLabel.h
Created Nov 5, 2012
UILabel subclass encapsulating interior shadow functionality
View SOInsetLabel.h
//
// SOInsetLabel.h
//
// Created by Joseph Hankin on 11/2/12.
// From code posted by Rob Mayoff.
// http://stackoverflow.com/questions/8467141/ios-how-to-achieve-emboss-effect-for-the-text-on-uilabel
// Copyright (c) 2012 Joseph Hankin. All rights reserved.
//
@shibukawa
shibukawa / build graphiviz as layout engine
Created Jan 22, 2013
Graphviz's "plain" output is good for layout engine. This command creates the simplest Graphviz binary on Mac. You can easy to bundle your own program. I will try to run on Windows or cross-compile. This build supports only following output formats: canon cmap cmapx cmapx_np dot eps fig gv imap imap_np ismap pic plain plain-ext pov ps ps2 svg sv…
View build graphiviz as layout engine
#! /bin/sh
./configure --enable-static --disable-shared --disable-ltdl --disable-swig --disable-sharp --disable-go --disable-guile --disable-io --disable-java --disable-lua --disable-perl --disable-php --disable-python --disable-r --disable-ruby --disable-tcl --without-pic --without-tclsh --without-x --without-wish --without-expat --without-xpm --without-z --without-Xaw --without-webp --without-rsvg --without-ghostscript --without-visio --without-pangocairo --without-lasi --without-glitz --without-freetype2 --without-fontconfig --without-gtk --without-ming --without-qt --without-quartz --without-glut --without-cgraph --without-libgd --without-gdk_pixbuf LDFLAGS="-mmacosx-version-min=10.6"
@johanneswuerbach
johanneswuerbach / .travis.yml
Last active Mar 25, 2021
Deploy an iOS app to testflight using Travis CI
View .travis.yml
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@sethrylan
sethrylan / checkstyle.gradle
Last active Dec 25, 2018
Code Quality Tasks for Android
View checkstyle.gradle
configurations {
codequality
}
repositories {
mavenCentral()
}
dependencies {
codequality 'com.puppycrawl.tools:checkstyle:5.6'
@cyrilmottier
cyrilmottier / _app_avelibRelease_res_values_config.xml
Last active Nov 20, 2020
Using the new Gradle-based Android build system: an example
View _app_avelibRelease_res_values_config.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="config_app_name">AVélib</string>
<string name="config_authority">com.cyrilmottier.android.avelib.citybikes</string>
<string name="config_com.google.android.maps.v2.api_key">XXX</string>
</resources>
View 1MarkerAnimation.java
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021
Learning Haskell
View gist:8739525
@wbroek
wbroek / genymotionwithplay.txt
Last active Nov 9, 2021
Genymotion with Google Play Services for ARM
View genymotionwithplay.txt
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
View FloatLabelLayout.java
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software