Skip to content

Instantly share code, notes, and snippets.

@rraallvv
rraallvv / main.lua
Last active August 29, 2015 14:21 — forked from charles-l/main.lua
-- This gist uses http://luapower.com/objc.html as an FFI. I think it works on it's own, but I would recommend
-- getting the whole LuaPower project, because all the libraries rock.
--
-- This script will open a window that displays two rectangles. One red and one blue.
local glue = require'glue'
local objc = require'objc'
local ffi = require'ffi'
local pp = require'pp'
#import <dlfcn.h>
#import <Foundation/Foundation.h>
struct BlockDescriptor
{
unsigned long reserved;
unsigned long size;
void *rest[1];
@rraallvv
rraallvv / music.m3u
Last active June 16, 2016 16:51 — forked from yandod/music.m3u
Format for Radiotunnes channels
# Format for Radiotunnes channels
# Standard quality
# http://pub[1 -10].radiotunes.com:80/radiotunes_[channel name]
# example
http://pub6.radiotunes.com:80/radiotunes_tophits
# Low quality
# http://pub[1 -10].radiotunes.com:80/radiotunes_[channel name]_aac
#!/bin/sh
# This script will install a Git pre-push hook that prevents force pushing the master branch.
# Install in current Git repo:
# curl -fL https://gist.githubusercontent.com/stefansundin/d465f1e331fc5c632088/raw/install-pre-push.sh | sh
# Uninstall:
# rm .git/hooks/pre-push
# in each repository that you've added this to.
GITROOT=`git rev-parse --show-toplevel 2> /dev/null`
// sample of using POCO's ThreadPool
#include "Poco/Runnable.h"
#include "Poco/ThreadPool.h"
#include <iostream>
using namespace std;
class Worker:public Poco::Runnable{
public: