This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in "$@" | |
do | |
filename="${f%.*}" | |
plutil -convert xml1 "$filename".json -o "$filename".plist | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <dlfcn.h> | |
#import <Foundation/Foundation.h> | |
struct BlockDescriptor | |
{ | |
unsigned long reserved; | |
unsigned long size; | |
void *rest[1]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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: |
NewerOlder