Skip to content

Instantly share code, notes, and snippets.

@hijonathan
hijonathan / data.js
Last active December 20, 2015 03:59
The Kera.io blog before they pivoted.
window.keraData = {
"tumblelog": {
"title": "Kera's Onboarding & UX Blog",
"description": "Original analysis, best practices, and top examples about web onboarding, usability, and gamification.",
"name": "kerablog",
"timezone": "US\/Eastern",
"cname": "blog.kera.io",
"feeds": []
},
"posts-start": 0,
@DavidPratten
DavidPratten / clsPermanentID.cls
Last active December 29, 2015 19:09
Add an Microsoft Project automatically allocated "Permanent ID" Number field that is unique (never reused) and survives task cut and paste operations.
'
' The MIT License (MIT)
' Copyright (c) 2013 David Robert Pratten http://davidpratten.com
'
' Permission is hereby granted, free of charge, to any person obtaining a copy
' of this software and associated documentation files (the "Software"), to deal
' in the Software without restriction, including without limitation the rights
' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
' copies of the Software, and to permit persons to whom the Software is
' furnished to do so, subject to the following conditions:
@redapple
redapple / schema_org.py
Created June 19, 2014 09:05
schema.org with XPath blog post
from scrapy.selector import Selector
selector = Selector(text="""
<div itemscope itemtype ="http://schema.org/Movie">
<h1 itemprop="name">Avatar</h1>
<span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span>
<span itemprop="genre">Science fiction</span>
<a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
</div>""", type="html")
@nikcorg
nikcorg / berlin-jsconf-2014.md
Last active August 4, 2023 12:45
Slide decks of JSConf 2014
@scott-kloud
scott-kloud / Migrate-AzureVM.ps1
Last active December 31, 2021 02:02
Migrates a Azure Virtual Machine to another subscription or data centre
<#
.SYNOPSIS
Migrates a Azure Virtual Machine to another subscription or data centre
.DESCRIPTION
Shutsdown the source VM
Exports the VM config to a temporary file
Loops through all Azure disks attached to the source VM
Schedules an async copy of the underlying VHD to the destination storage account
- optionally overwrites existing VHD in destination if it exists
@mvark
mvark / foodtracker.html
Last active April 3, 2017 20:29
Single Page Application (SPA) to track food expiry dates shows how to implement CRUD functionality through Azure Mobile Services HTTP OData REST calls, without writing any server-side code
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Food Tracker</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<link href='http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.1.1/fullcalendar.min.css' rel='stylesheet' />
@troyhunt
troyhunt / CreateAzureResources.ps1
Created January 22, 2015 13:12
Full script for provisioning all the resources I typically use for a new Azure website and database back end
# Per project params
$projectName = "TroyPSTest"
$hostName = "troypstest.troyhunt.com"
# Environment constants
$location = "West US"
$webResourceGroup = "Default-Web-WestUS"
$webHostingPlan = "DefaultServerFarm"
$dbResourceGroup = "Default-SQL-WestUS"
$dbServerName = "snyb5o1pxk"
@troyhunt
troyhunt / DeleteAzureResources.ps1
Created January 22, 2015 13:14
This one removes all the components I normally create for an Azure website
# Input params
$projectName = "TroyPSTest"
# Constants
$dbServerName = "snyb5o1pxk"
$dbServerLogin = "troyhunt"
$dbServerPassword = "P@ssw0rd"
$apiVersion = "2014-04-01"
# Computed vars
@vsouza
vsouza / .bashrc
Last active September 19, 2025 15:41
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
workflow AutoShutdownWorkflow
{
#$VerbosePreference = "continue"
# Automation Settings
$pscreds = Get-AutomationPSCredential -Name "runbook-account"
$subscriptionName = "[subscription name here]"
$tagName = "autoShutdown"
# Authenticate using WAAD credentials