Skip to content

Instantly share code, notes, and snippets.

View daviwil's full-sized avatar

David Wilson daviwil

View GitHub Profile
@jessefreeman
jessefreeman / GruntFile.js
Created August 20, 2013 12:52
Sample build script for Super Falling Zombies.
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-express-server');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-open');
@nohwnd
nohwnd / example.tests.ps1
Created November 5, 2015 21:26
Pester problem matcher for VS Code
describe "DS"{
it "skipped" {} -skip
it "pending" {} -Pending
It "throw" { throw "sdfad" }
It "assertion fail" {1 | should be 10 }
It "string assertion fail" {"asdf" | should be "ffsad" }
it "success" {"adsf"}
}
function Get-AzureTemplate {
param(
$pattern,
[Switch]$Force
)
if(!$global:AzureTemplates -or $Force) {
$url="https://api.github.com/repos/Azure/azure-quickstart-templates/git/trees/master"
$global:AzureTemplates=(irm $url).tree | ?{$_.type -eq "tree"}
}
Import-Module -Name Emojis
function Invoke-EmojiSelection {
param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context)
$EmojiText = $context.CurrentFile.GetText($context.SelectedRange)
$Emoji = Get-Emoji -Name $EmojiText
if ($Emoji)
{
$context.CurrentFile.InsertText($Emoji, $context.SelectedRange)
@aearly
aearly / Gruntfile.js
Last active June 24, 2016 06:43
Annotated Browserify Gruntfile
/**
* Annotated Gruntfile.
* This builds a Backbone/Marionette application using Dust.js (Linkedin fork) as a
* templating system, as well as some helpers from Foundation, with Browserify.
* It also configures a watcher and static server with live reload.
*/
module.exports = function (grunt) {
// This automatically loads grunt tasks from node_modules
require("load-grunt-tasks")(grunt);
@knoxyca
knoxyca / vscode.reg
Last active October 6, 2016 18:35
This is a registry entry that will add Open with VSCode Insiders to all users on a system.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VSCodeInsiders]
@=hex(2):4f,00,70,00,65,00,6e,00,20,00,77,00,69,00,74,00,68,00,20,00,43,00,6f,\
00,64,00,65,00,20,00,2d,00,20,00,49,00,6e,00,73,00,69,00,64,00,65,00,72,00,\
73,00,00,00
"Icon"=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,56,00,53,00,20,\
00,43,00,6f,00,64,00,65,00,20,00,49,00,6e,00,73,00,69,00,64,00,65,00,72,00,\
@jwinder
jwinder / gist:8522372
Created January 20, 2014 15:45
hipchat.el
(require 'mine-jabber)
;; Username & nickname fields from https://banno.hipchat.com/account/xmpp
(setq hipchat-username "")
(setq hipchat-nickname "")
(setq hipchat-password "")
(setq hipchat-autojoin-rooms
'("aggregation" "assets" "banno_talk" "banno_cms" "data_services" "emacs" "grip" "kernel" "southen" "troll_talk" "webdev" "design_talk"))
@minimal
minimal / jetty.clj
Created January 20, 2010 01:17
Websockets with clojure + jetty
;; Copyright (c) James Reeves. All rights reserved.
;; The use and distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which
;; can be found in the file epl-v10.html at the root of this distribution. By
;; using this software in any fashion, you are agreeing to be bound by the
;; terms of this license. You must not remove this notice, or any other, from
;; this software.
(ns compojure.server.jetty
"Clojure interface to start an embedded Jetty server."
@dfinke
dfinke / Get-PSGalleryInfo.ps1
Created January 29, 2016 19:11
Get statistics for published PowerShell Gallery packages
function Get-PSGalleryInfo {
param(
[Parameter(ValueFromPipelineByPropertyName=$true)]
$Name
)
Begin {
$t = @"
{Name*:PowerShellISE-preview} {[version]Version:5.1.0.1} (this version) {[double]Downloads:885} {[DateTime]PublishDate:Wednesday, January 27 2016}
{Name*:ImportExcel} 1.97 {Downloads:106} Monday, January 18 2016
"@
@Jaykul
Jaykul / FileTypes.ANSI.Format.ps1xml
Last active March 13, 2018 00:10
ANSI Escape Sequences
<?xml version="1.0" encoding="utf-8" ?>
<!-- *******************************************************************
This is Joel "Jaykul" Bennett's coloring format file for PowerShell 5.1
******************************************************************** -->
<Configuration>
<SelectionSets>
<SelectionSet>
<Name>FileSystemTypes</Name>
<Types>
<TypeName>System.IO.DirectoryInfo</TypeName>