Skip to content

Instantly share code, notes, and snippets.

// 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:
#!/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`
@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
#import <dlfcn.h>
#import <Foundation/Foundation.h>
struct BlockDescriptor
{
unsigned long reserved;
unsigned long size;
void *rest[1];
@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'
@rraallvv
rraallvv / json-to-plist.sh
Created February 25, 2016 19:14 — forked from sugarmo/json-to-plist.sh
A shell script for Automator that can convert JSON to .plist file.
for f in "$@"
do
filename="${f%.*}"
plutil -convert xml1 "$filename".json -o "$filename".plist
done
@rraallvv
rraallvv / XCodeReporter.js
Last active June 8, 2016 18:10 — forked from distractdiverge/XCodeReporter.js
A custom reporter for jshint to present errors in a format for XCode to read them.
module.exports = {
reporter: function (res) {
var len = res.length;
var str = "";
res.forEach(function (r) {
var file = r.file;
var err = r.error;
str += file + ":" + err.line + ": error: " + err.reason + "\n";
@rraallvv
rraallvv / audioaddict-premium-account-generator.sh
Last active June 24, 2016 19:01 — forked from hackruu/di-fm-premium-account-generator.sh
Generate premium account and playlists.
#!/bin/bash
AGENT="AudioAddict-di/1.4.7 iOS/8.1"
COOKIES="./cookies.txt"
AUTH="ephemeron:dayeiph0ne@pp"
DOMAIN=gmail.com
PLAYLISTDI="di.fm.m3u"
PLAYLISTSKY="sky.fm.m3u"
PLAYLISTJAZZ="jazzradio.m3u"
PLAYLISTROCK="rockradio.m3u"
JSONDI="http://listen.di.fm/premium_high.json"
@rraallvv
rraallvv / Logic_Pro_X_package_downloads.txt
Last active April 18, 2025 17:23 — forked from rickychilcott/gist:3222c15663dac7d987a1
Logic Pro X Package Downloads
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/GarageBandBasicContent.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/JamPack1.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/JamPack4_Instruments.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsChillwave.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsDeepHouse.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsDubstep.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsElectroHouse.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsHipHop.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsLegacy1.pkg
http://audiocontentdownload.apple.com/lp10_ms3_content_2013/MAContent10_AppleLoopsLegacyRemix.pkg
@rraallvv
rraallvv / Uninstall-pkg.md
Last active September 10, 2017 21:37 — forked from githubutilities/Uninstall-pkg.md
Uninstall pkg manually in OS X

Mac Uninstall pkg Manually

  • using pkgutil
# list all your installed packages
pkgutil --pkgs

# show your package info
pkgutil --pkg-info