Skip to content

Instantly share code, notes, and snippets.

View don-smith's full-sized avatar
🧘

Don Smith don-smith

🧘
  • HYPR
  • Tākaka, NZ
View GitHub Profile
@don-smith
don-smith / Relocate.ps1
Created March 25, 2015 08:26
PowerShell script to copy a VM from one Azure subscription to another one
# Gratefully borrowed and edited from
# http://blogs.msdn.com/b/microsoft_press/archive/2014/01/29/from-the-mvps-copying-a-virtual-machine-from-one-windows-azure-subscription-to-another-with-powershell.aspx
# Source VM
$sourceSubscriptionName = "Name of the source subscription"
$destSubscriptionName = "Name of the destination subscription"
Get-AzureVM
$vmName = "name-of-source-vm"
@don-smith
don-smith / default.html
Created February 24, 2014 02:28
An illustration of structuring a WinJS app for better JavaScript modularity. See [link] for more information.
<!DOCTYPE html>
<!-- Content forthcoming -->
@don-smith
don-smith / README.md
Last active January 3, 2016 02:29 — forked from syntagmatic/README.md
Force directed cell splitting

Links being severed over time inside of a convex hull

@don-smith
don-smith / README.md
Last active January 3, 2016 02:18 — forked from syntagmatic/README.md
Early cell splitting concept
@don-smith
don-smith / meteor-dump.sh
Last active January 18, 2021 03:17 — forked from olizilla/meteor-dump.sh
A couple of shell scripts to dump and restore production Meteor (MongoDB) databases.
#!/bin/bash
# __
# _____ ____ _/ |_ ____ ____ _______
# / \ _/ __ \ \ __\_/ __ \ / _ \ \_ __ \
# | Y Y \\ ___/ | | \ ___/ ( <_> ) | | \/
# |__|_| / \___ > |__| \___ > \____/ |__|
# \/ \/ \/
#
# .___
# __| _/ __ __ _____ ______
@don-smith
don-smith / app.coffee
Created September 30, 2012 06:28
Facebook authentication using EveryAuth 0.2.34 (prerelease: express3 branch) with Express.js 3.0.0rc4
facebook = require './facebook'
mongoose = require 'mongoose'
express = require 'express'
routes = require './routes'
http = require 'http'
path = require 'path'
app = express()
app.configure ->
app.set 'port', process.env.PORT || 3000
@don-smith
don-smith / jquery.ui.widget.js
Created May 18, 2011 03:35
Does destroy need to use both this.element and this.widget()?
...
$.Widget.prototype = {
...
destroy: function() {
this.element
.unbind( "." + this.widgetName )
.removeData( this.widgetName );
this.widget()
.unbind( "." + this.widgetName )
.removeAttr( "aria-disabled" )
(function($){
$.widget("ui.mywidget", {
options: {
autoOpen: true
},
_create: function(){
// by default, consider this thing closed.
# app/views/talks/_form.html.erb
<%= form_for([@event, @talk]) do |f| %>
<% if @talk.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@talk.errors.count, "error") %> prohibited this talk from being saved:</h2>
<ul>
<% @talk.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<html>
<head><title><%= yield(:title) %></title></head>
<body>
<h1><%= yield(:title) %></h1>
<%= yield %>
</body>
</html>