Skip to content

Instantly share code, notes, and snippets.

@zhaoyk
zhaoyk / SwipeArea.qml
Created January 11, 2016 01:01 — forked from kovrov/SwipeArea.qml
Swipe
/* This code was written by Sergejs Kovrovs and has been placed in the public domain. */
import QtQuick 2.0
MouseArea {
property point origin
property bool ready: false
signal move(int x, int y)
signal swipe(string direction)
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
@zhaoyk
zhaoyk / ffr.c
Created December 22, 2013 08:06 — forked from cloudwu/ffr.c
#include <stdint.h>
#include <stdlib.h>
// assert(RAND_MAX >= 0x7fff)
float
random_0_to_1() {
union {
uint32_t d;
float f;
} u;