Skip to content

Instantly share code, notes, and snippets.

View jsjohnst's full-sized avatar

Jeremy Johnstone jsjohnst

View GitHub Profile
@nicklockwood
nicklockwood / gist:9605636
Last active December 11, 2019 15:17
Singleton Category implementation
Singleton.h
-------------
@protocol Singleton
@optional
+ (instancetype)sharedInstance;
@end
@akitaonrails
akitaonrails / upgrading-vagrant-fusion.mdown
Created October 24, 2013 17:40
Upgrading Vagrant from the default Virtualbox provider to VMWare Fusion on the Mac

I had some headaches yesterday while trying to upgrade to VMWare Fusion with Vagrant.

The steps that work are:

  • export your boxes from Virtualbox to OVA files
  • run 'vagrant destroy' on all your boxes
  • uninstall Virtualbox using the uninstaller script in the installer DMG
  • download VMWare Fusion
  • run 'vagrant plugin install vagrant-vmware-fusion' to install the provider plugin
  • run 'vagrant plugin license vagrant-vmware-fusion license.lic' to install the license you just bought
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XML Sitemap</title>
ID='isc.org/MX'; DOC=`curl --silent "http://dig.jsondns.org/IN/$ID" | sed -e "s|^{| {\"_id\":\"$ID\",|"`; curl -X POST http://localhost:5984/dns/ -H 'Content-Type: application/json' -d "$DOC"
@AlanQuatermain
AlanQuatermain / insert-bsd-header-snippet
Last active September 1, 2020 21:48
A TextMate snippet to create a BSD License header for your source file.
/*
* $TM_FILENAME
* ${1:`echo "$TM_FILEPATH" | awk -F"/" '{x=NF-1}{print $x}'`}
*
* Created by `id -P | awk -F ":" '{ print $8 }'` on `date "+%d/%m/%Y"`.
*
* Copyright (c) `date +%Y` ${2:$TM_ORGANIZATION_NAME}
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without