Skip to content

Instantly share code, notes, and snippets.

View rgm's full-sized avatar

Ryan McCuaig rgm

View GitHub Profile
//#include "Menu.h"
#define REGISTER(x) REGISTER_Extension<x::Definition>(GROUPID_Extension##x, action, pInfo, ioData, cbp, reply)
extern "C" long GS_EXTERNAL_ENTRY plugin_main(long action,
void *pInfo,
long &ioData,
CallBackPtr cbp)
{
::GS_InitializeVCOM(cbp);
ARCHS = i386
VALID_ARCHS = $(ARCHS)
WRAPPER_EXTENSION = vwlibrary
//
// define VW_SDK_ROOT_PATH for your local filesystem
// to make #include <foo.h> work correctly
//
VW_SDK_ROOT_PATH = ../sdk/vendor/sdk2011/SDKLib
@rgm
rgm / ConfigCommon.xcconfig
Created April 1, 2011 21:06
Boilerplate build settings, entry point files, prefix header for Vectorworks SDK plugins
ARCHS = i386
VALID_ARCHS = $(ARCHS)
WRAPPER_EXTENSION = vwlibrary
//
// define VW_SDK_ROOT_PATH for your local filesystem
// to make #include <foo.h> work correctly
//
VW_SDK_ROOT_PATH = ../sdk/vendor/sdk2011/SDKLib
We couldn’t find that file to show.
--type-set
vectorscript=.vss
class Generate < Thor
desc 'menu', 'Create .cpp/.h/.r for a bare menu'
def menu
onoe 'IMPLEMENT ME'
end
desc 'parametric_menu', 'Create .cpp/.h/.r for a menu & parametric'
def parametric_menu
onoe 'IMPLEMENT ME'
#include "Menu.h"
using namespace Menu;
namespace Menu
{
const char *universalName = "<%= universal_name %>";
const int resourceIndex = 11000;
static SMenuDef gMenuDef =
#!/usr/bin/env ruby
# run with ARGV[0] pointed at an iPhone backup directory to re-tag the files
# with extensions.
#
# written under the influence of learning haskell / clojure / frp so also quite
# possibly the worst ruby ever written.
class String
def iphone_extension
@rgm
rgm / tidy-desktop
Last active December 14, 2015 01:29
Desktop file stasher, inspired by "Clean," see https://itunes.apple.com/ca/app/clean/id418412301?mt=12
#!/usr/bin/env ruby
# squirrel away src files into dst/YEAR-Month
# rename incoming file x.ext as x-1.ext if there's already x.ext in dst
# TODO getopts this stuff
source_folder = '~/Desktop'
destination_folder = "~/Documents/Crap/"
dry_run = false
@rgm
rgm / post-commit
Created March 1, 2013 00:05
Image-snapping, location-tagging post-commit hook
#!/bin/sh
# git post-commit hook to snap a photo and sample your current location
SNAPS_FOLDER="$HOME/Dropbox/gitshots"
# extended from https://gist.github.com/kytrinyx/4489037
#
# you will need these binaries on $PATH:
#