Skip to content

Instantly share code, notes, and snippets.

View UweTrottmann's full-sized avatar

Uwe Trottmann UweTrottmann

View GitHub Profile
@UweTrottmann
UweTrottmann / install-run-deps.txt
Last active November 24, 2022 21:31
Building and running node-webkit for ARM This is based on the script available at http://code.google.com/p/chromium/wiki/LinuxChromiumArm#Recipe3:_Packaged/Automated_Cross_compiling
=== Relevant links
https://help.ubuntu.com/community/MultiArch
http://unix.stackexchange.com/questions/60282/can-one-install-an-armel-ubuntu-package-on-armhf-ubuntu-system
=== Setup multiarch for armel
Create
'/etc/dpkg/dpkg.cfg.d/multiarch'
containing
'foreign-architecture armel'.
@UweTrottmann
UweTrottmann / MyApp.java
Created May 19, 2013 18:13
Set up a dummy account for your Android SyncAdapter. Run this on app startup, e.g. in your Application classes onCreate().
public class MyApp extends Application {
@Override
public void onCreate() {
super.onCreate();
// set up a dummy account for syncing
AccountManager manager = AccountManager.get(this);
final Account account = new Account(MyAccountAuthenticator.ACCOUNT_NAME, getPackageName());
if (manager.addAccountExplicitly(account, null, null)) {
// Only change sync settings if it did not exist, yet
@UweTrottmann
UweTrottmann / Intents.java
Last active August 29, 2015 13:57
Preview of com.battlelancer.seriesguide.api.Intents class.
/*
* Copyright 2014 Uwe Trottmann
*
* 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
@UweTrottmann
UweTrottmann / GridInsetDecoration.java
Last active December 9, 2023 14:43
RecyclerView grid spacing decoration for use with GridLayoutManager.
/*
* Copyright 2015 Uwe Trottmann
*
* 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
@UweTrottmann
UweTrottmann / MultiSwipeRefreshLayout.java
Created April 21, 2015 14:30
Android SwipeRefreshLayout with multiple swipeable children. Min API 14.
/*
* Copyright 2014 Uwe Trottmann
*
* 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