Skip to content

Instantly share code, notes, and snippets.

View rowanj's full-sized avatar
🐧
Seizing the machines of production

Rowan James rowanj

🐧
Seizing the machines of production
View GitHub Profile
#include "Bind.hpp"
namespace OTR
{
template <typename Object>
int objectID(Object const& object)
{
return reinterpret_cast<intptr_t>(&object);
}
template <typename Sig, typename Func>
@rowanj
rowanj / sign.py
Last active February 8, 2023 18:13
Python script for signing an OS X application such that it runs without warning users about being un-signed
#!/usr/bin/env python
# Original work by Rowan James at https://gist.github.com/rowanj/5475988
# This is free and unencumbered software released into the public domain.
# http://unlicense.org
import argparse
import subprocess
import os
import glob
@rowanj
rowanj / UIImage+Extensions.h
Last active December 16, 2015 18:39 — forked from troystribling/UIImage+Extensions.h
Make a blank UI image with a given size, and optional fill color
#import <Foundation/Foundation.h>
@interface UIImage (Extensions)
+ (UIImage*)blankImage:(CGSize)_size;
+ (UIImage*)blankImage:(CGSize)_size withColor:(UIColor*)_color;
@end
[gui "net.phere.GitX"]
key = value
@rowanj
rowanj / InstallProvisioning.py
Last active December 18, 2015 16:29
Script to install or update all .mobileprovision files under the current path
__author__ = 'rowanj@burninator.net'
import os
import fnmatch
import plistlib
import filecmp
import shutil
import sys
@rowanj
rowanj / GalleryView.rib
Created August 15, 2013 02:17
XIB and Interface Builder replacement
{
"controller": "GalleryViewController",
"name": "background",
"color": {
"red": 0.16862745098039,
"green": 0.16862745098039,
"blue": 0.16862745098039
},
"subviews": [
{
@rowanj
rowanj / BinaryPoint dark.dvtcolortheme
Last active December 28, 2015 06:49
Dark Xcode colour scheme based on Solarized palette by Ethan Schoonover: http://ethanschoonover.com/solarized Put it in ~/Library/Developer/Xcode/UserData/FontAndColorThemes
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.127549 0.462659 0.782314 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 12.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.127549 0.462659 0.782314 1</string>
@rowanj
rowanj / XVM.xc
Last active August 29, 2015 13:57
My XVM configuration
/**
* Config was created in XVM Editor v0.7417
* at Sat Mar 15 14:02:43 GMT+1100 2014
*/
{
"configVersion": "5.0.1",
"editorVersion": "0.74",
"definition": {
"author": "rvalue (based on QuickyBaby)",
"date": "15/03/2014",
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWDCNKxGWwzjLkgyJpHL5GblAotM436Lkg8UgomxrCQ6IPqw8nh5aaLOTEo8I6Sv5npiovAAlJhXoNIECcZXMgameg+/SAqWwlvrP3qsBK7twQv98ilROy8C79oSfmPmpEWlC58YVLhpY7nlzTYRLKKRdJN9OofcF8i/uhq79reP6afG/9y3VujBvhPbv7r/h7eRmV3jCNnabYmp5btnG1NeovDgvCDE+uUZUibvHGx4azgomcFXS1U1p6x0MZmHs+WS/QzLypHpe7Z1FroPl5sSyqvIPks20ncESlJy5C1cSKEG8FEBQf7nlh7BjdS3BckSiZL6TW4xXYfFdkDDtB rowanj@the_sneak
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtukmF2Wey++fnyKxo55MBI8hZHDm/+RQTKBRximJV7wHpRu444kMt6bxFjc1W/6c94J/6H6XBfr8/WZW1uEa8zdjmFu/la12jECcpC5QWfQdK9v5IC/3hbIvLQ0SAaj2q8TapG0j20CmA8yrJUjOi1R9Y0MPPk7ANYu+p2aaUZwBEAsG/Ue3+SVpi5t/2ra00dIB73uxMTqUd8iRJYnOK8BcKmQ3szLOS/HpHSB06OBvDiuWoYBNZ6XmzUwV1SoH9YQjOfpf8vYmT444fHJTotdb77mcFos/Ll1U4rkq5llEB6LWFGE7RZ8FFS2lWwyyq5vt2F3AoAfEiQi9eoOix rowanj@largo-linux
<?php
require_once('wp-includes/post-thumbnail-template.php');
$test_post = "some post specifier";
$result = get_post_thumbnail_id($test_post);
print("testing the function: $result");
?>