Skip to content

Instantly share code, notes, and snippets.

#replace count=1024 with the number of MB (!) you want to grow the image file
dd if=/dev/zero bs=1024k count=1024 >> my_loop_image_file
e2fsck -f my_loop_image_file
resize2fs my_loop_image_file
//
// IDViewController.m
// MyFirstIndoorsApp
//
// Copyright (c) 2013 indoo.rs GmbH. All rights reserved.
//
#import "IDViewController.h"
#import <CoreLocation/CoreLocation.h>
@TomTasche
TomTasche / extract-certificate.sh
Created September 1, 2014 18:00
commands i used to extract the ssl-certificate from a running system for usage with heroku
keytool -list -keystore keystore.jks
keytool -export -alias 1 -keystore store.jks -file store2.crt
openssl x509 -in store2.crt -out store2-pem.crt -outform pem -inform der
keytool -v -importkeystore -srckeystore store.jks -srcalias 1 -destkeystore store2.p12 -deststoretype PKCS12
openssl pkcs12 -in store2.p12 -out store2.pem
openssl rsa -in store2.key -inform DER -out store2-nopw.key
# https://devcenter.heroku.com/articles/ssl-endpoint#update-certificate
@TomTasche
TomTasche / gist:796504
Created January 26, 2011 10:08
OpenOffice Document Reader - File Chooser
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:468)
at android.graphics.Bitmap.createBitmap(Bitmap.java:435)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340)
at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
at android.content.res.Resources.loadDrawable(Resources.java:1709)
@TomTasche
TomTasche / School going Google.
Created April 11, 2011 06:00
Theses about migrating my school to Google Apps?
So, I want to migrate my school to Google Apps. Problem is, that we're a technical school (http://translate.google.com/translate?js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&sl=auto&tl=en&u=http%3A%2F%2Fwww.htl.rennweg.at%2F) and Google Apps isn't that attractive for most of us (considering you could create your own Gmail Account within seconds...).
In order to make Google Apps more attractive, I thought about something like offers for cheaper Android phones / tablets and / or ChromeOS netbooks. Additionally, someone asked if it's possible to maintain some kind of default content set that's available for every new account (important contacts, documents, ...).
My theses would then deal with the dis- / advantages of migrating schools to Google Apps, and maybe how behavior changes when using Google-only (Android + ChromeOS + Google Apps) in classroom (how do people share documents? how do they communicate?).
What do you think? Ever done before? Interesting? Stupid? Feedback welcome. :)
Have a great day
Tom
{"id":1,"text":"Tom³ Tag","timestamp":"Apr 23, 2011 12:11:43 PM","url":"http://threetimestom.com/","author":{"id":1,"name":"Tom"}}
@TomTasche
TomTasche / uservoice_announcify.js
Created April 26, 2011 16:16
UserVoice - Announcify
<script type="text/javascript">
(function() {
var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true;
uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/1I1faem5ZQM8ojOSkiew.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
})();
</script>
<receiver android:name=".CallListener">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
@TomTasche
TomTasche / mobfox_ads.java
Created July 28, 2011 13:35
MobFox's instructions on how to implement their ads on Android. Faulty.
MobFoxView mobfoxView = new MobFoxView(this, publisherId, test, includeLocation, boolean animation);
@TomTasche
TomTasche / bloki_integration.html
Created August 3, 2011 20:03
How To integrate Bloki with two simple lines of code
<link href="http://bloki-engine.appspot.com/style/uservoice/horizontal_red.css"
rel="stylesheet" type="text/css" />
<script language='javascript'
src='http://bloki-engine.appspot.com/submit/submit.nocache.js'
type='text/javascript'></script>