Skip to content

Instantly share code, notes, and snippets.

@saik0
saik0 / PKGBUILD
Created November 13, 2012 21:14
android-support r11-1
# Maintainer: Jakub Schmidtke <sjakub-at-gmail-dot-com>
# Contributor: Joel Pedraza <[email protected]>
pkgname=android-support
pkgver=r11
pkgrel=1
pkgdesc='Android Support Package'
arch=('any')
url="https://developer.android.com/sdk/compatibility-library.html"
license=('custom')
@saik0
saik0 / PKGBUILD
Created November 13, 2012 21:46
eclipse-android 21.0.0-1
# Maintainer: Jakub Schmidtke <sjakub-at-gmail-dot-com>
# Contributor: Joel Pedraza <[email protected]>
# Contributor: Forrest L <cybercyst at gmail com>
# Contributor: Michael P <[email protected]>
# Contributor: Marcin "eXine" M. <[email protected]>
# Contributor: Artyom Smirnov <[email protected]>
# Contributor: Ashok `ScriptDevil` Gautham <[email protected]>
# Contributor: Laszlo Papp <djszapi2 at gmail com>
# Contributor: Antonio Santos <asantos at gmail dot com>
@saik0
saik0 / DemoUnifiedPreferenceActivity.java
Created November 14, 2012 18:23
How to find preferences and setup listeners in UnifiedPreference
/*
** Copyright 2012, Joel Pedraza
**
** 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
@saik0
saik0 / MyContentProvider.java
Created November 15, 2012 15:14
Sample ContentProvider that performs all operations transactionally and notifies once in batch operations.
public class MyContentProvider extends ContentProvider {
private final ThreadLocal<Boolean> mApplyingBatch;
private final ThreadLocal<Set<Uri>> mChangedUris;
private boolean applyingBatch() {
return mApplyingBatch.get() != null && mApplyingBatch.get();
}
private Uri insert(final Uri uri, final ContentValues values, final SQLiteDatabase db) {
// do the uri matching and insert
@saik0
saik0 / index.html
Created April 3, 2013 02:47
leaflet test
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" />
<![endif]-->
<script type="text/javascript" src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script>
<script type="text/javascript" src="leafletembed.js"></script>
</head>
<body onload="initmap();">
@saik0
saik0 / PKGBUILD
Created September 19, 2013 14:22
Boson X PKGBUILD
# Maintainer: Ben R <thebenj88 *AT* gmail *DOT* com>
pkgname=boson-x
pkgver=1.0.1
_pkgver=${pkgver//\./_} # replace all '.' with '_'
pkgrel=3
pkgdesc="DRM-free rotational running game"
arch=('x86_64')
url="http://www.boson-x.com/"
license=('Custom')
source=("http://downloads.muandheyo.com/BosonX_v${_pkgver}_Linux.zip"
if (get_application_name()=="Starbound - Beta") then
set_window_position2(0,0);
maximize();
undecorate_window();
end
@saik0
saik0 / 90-uinput.rules
Last active April 8, 2016 23:00
xboxdrv: Xbox 360 Wireless Receiver with up to four gamepads
# Set the ownership and permissions for the uinput device
KERNEL=="uinput", OWNER="root", GROUP="uinput", MODE="0660"
@saik0
saik0 / PKGBUILD
Last active August 29, 2015 14:04
android-platform-20
_rev=r03
_sdkver=L
_sdkint=20
pkgname=android-platform-${_sdkint}
pkgver=${_sdkver}_${_rev}
pkgrel=2
pkgdesc="Android SDK Platform, API-${_sdkint}"
arch=('any')
url="http://developer.android.com/sdk/index.html"
license=('custom')
(ns sieve.core
(:use clojure.data.priority-map)
(:gen-class))
(defn doto-last [coll f & args]
(let [idx (dec (count coll))
args (conj args (coll idx))]
(assoc coll idx (apply f args))))
(defn prime-gaps [gk-1]