$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices server.c -o server
$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices client.c -o client
This file contains 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/bash | |
# | |
# Build and iPhone Simulator Helper Script | |
# Shazron Abdullah 2011 | |
# | |
# WARN: - if your .xcodeproj name is not the same as your .app name, | |
# this won't work without modifications | |
# - you must run this script in where your .xcodeproj file is | |
PROJECTNAME=$1 |
This file contains 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
#include <stdio.h> | |
#include <uv.h> | |
static void on_close(uv_handle_t* handle); | |
static void on_connect(uv_connect_t* req, int status); | |
static void on_write(uv_write_t* req, int status); | |
static uv_loop_t *loop; | |
static uv_buf_t alloc_cb(uv_handle_t* handle, size_t size) { |
This file contains 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
--[[ config | |
root = "./" | |
listen = "127.0.0.1:8786" | |
redisaddr = "127.0.0.1:6379[1]" | |
dbfile = root .. "backup.db" | |
thread = 4 | |
logger = nil | |
harbor = 1 |
This file contains 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
#/usr/local/bin/python | |
import os,sys | |
from xml.etree import ElementTree | |
from PIL import Image | |
def tree_to_dict(tree): | |
d = {} | |
for index, item in enumerate(tree): | |
if item.tag == 'key': | |
if tree[index+1].tag == 'string': |
This file contains 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
--- p6.cpp 2014-03-28 22:55:37.000000000 -0500 | |
+++ p6.c 2014-03-28 23:02:28.000000000 -0500 | |
@@ -7,9 +7,8 @@ | |
#define PNG_DEBUG 3 | |
#include <png.h> | |
-#include <glm/glm.hpp> | |
-#include <glm/gtc/matrix_transform.hpp> | |
-#include <glm/gtc/type_ptr.hpp> | |
+#include <kazmath/kazmath.h> |
A simple Python script to extract unicode emojis from this page and store their details in a JSON
file.
Additionally, it also extract the emoji images as PNG files.
Store the page:
This file contains 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
-- | |
-- LPeg-based XML parser. | |
-- | |
-- * Grammar term names are the same as in the XML 1.1 | |
-- specification: http://www.w3.org/TR/xml11/ | |
-- * Action functions are missing. | |
-- | |
-- Copyright (C) 2012 Adrian Perez <aperez@igalia.com> | |
-- Distribute under terms of the MIT license. | |
-- |
Tired of waiting for emacs to start on OS X? This step by step guide will
teach you how to install the latest version of emacs and configure it to start
in the background (daemon mode) and use emacsclient
as your main editor.
Download the latest pretest version of [Emacs for Mac OS X]: http://emacsformacosx.com/builds
This file contains 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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import subprocess | |
import re | |
ntfs_pattern = re.compile(r'File System Personality: NTFS') | |
ntfs_device_node = re.compile(r'.*Device Node:.*') | |
device_dict = {} |
OlderNewer