Skip to content

Instantly share code, notes, and snippets.

@Ginny
Ginny / wysihtml5.js
Last active December 16, 2015 09:38
Wysihtml5
/**
* @license wysihtml5 v0.2.0
* https://github.com/xing/wysihtml5
*
* Author: Christopher Blum (https://github.com/tiff)
*
* Copyright (C) 2011 XING AG
* Licensed under GNU General Public License
*
*/
package cz.gnipjan.gpsmarker;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationListener;
@Ginny
Ginny / HomeActivity.java
Created April 24, 2012 17:01
Listview without extending ListActivity because of actionbar
public class HomeActivity extends MyActionBar {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ArrayList<String> events = new ArrayList<String>();
events.add("Birthday party");
events.add("Epic party");
@Ginny
Ginny / FirstActivity.java
Created April 19, 2012 12:06
Sharing a bundle between activities
public class FirstActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ArrayList<String> events = new ArrayList<String>();
events.add("Oslava narozenin Tomase");
events.add("Koncert 2,5 promile");
events.add("Grilovani na zahrade");
@Ginny
Ginny / BasePresenter.php
Created July 27, 2011 15:22
Model loader Nette
<?php
abstract class BasePresenter extends Nette\Application\UI\Presenter {
public function getModel($model) {
return $this->context->modelLoader->loadModel($model); // umozni nam v presenterech nacitat model ve tvaru: $this->getModel('foo')
}
}
?>
@Ginny
Ginny / Authenticator.php
Created June 19, 2011 11:37
Nette authenticator
<?php
use Nette\Object,
Nette\Security as NS;
/**
* Users authenticator.
*/
class Authenticator extends Object implements NS\IAuthenticator {