Skip to content

Instantly share code, notes, and snippets.

@mrdaemon
mrdaemon / hyperv-r2-configonly-import.ps1
Created December 29, 2010 19:36
Work in progress. cmdlet to import a config-only VM export on Hyper-V 2008 R2.
<#
.SYNOPSIS
Safely Imports Hyper-V Virtual Machines that were exported
as configuration only, without State Data (snapshots, VHDs, etc).
.DESCRIPTION
Hyper-V 2008 R2 removed the option to export a Virtual Machine without
its State Data (Snapshots, Virtual Disk Images (VHDs), Suspend State),
as configuration only through the GUI.
@nrabinowitz
nrabinowitz / quantize.js
Created July 25, 2011 17:19
Javascript module for color quantization, based on Leptonica
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
// fill out a couple protovis dependencies
/*!
* Block below copied from Protovis: http://mbostock.github.com/protovis/
* Copyright 2010 Stanford Visualization Group
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
@mxpv
mxpv / ProcessUtil.cs
Created September 28, 2012 09:31
Process start helper utility with CancellationToken and async output reading support
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Threading;
using Microsoft.Win32.SafeHandles;
namespace ConsoleApplication
{
public class ProcessUtil : IDisposable
{
@fulminator
fulminator / gist:4056699
Created November 11, 2012 23:26
Virtual Keyboard HTML
<textarea id="textarea">
</textarea>
<br /><br />
<div id="le_div">
<table>
<tr id="row_1">
<th></th>
<th></th>
<th></th>
@fulminator
fulminator / gist:4056702
Created November 11, 2012 23:27
Virtual Keyboard JavaScript
var textarea = document.getElementById("textarea");
var row_1 = document.getElementById("row_1").getElementsByTagName("th");
var row_2 = document.getElementById("row_2").getElementsByTagName("td");
var row_3 = document.getElementById("row_3").getElementsByTagName("td");
var row_4 = document.getElementById("row_4").getElementsByTagName("td");
var row_5 = document.getElementById("row_5").getElementsByTagName("td");
var row_6 = document.getElementById("row_6").getElementsByTagName("td");
var keys_1 = ["`", "-", "=", "[", "]", ";", "'", ",", ".", "/", "\\"]; // 11 keys
@altrive
altrive / New-OSBaseImage.ps1
Last active September 27, 2022 16:07
PowerShell script to create OS Base VHD for Windows 8/Windows Server2012
#Create OS BaseImage VHD
function New-OSBaseImage
{
[Cmdletbinding()]
param(
$VhdPath,
$OSImageName,
$MediaPath,
$VhdConfig,
$DismConfig,
@altrive
altrive / Get-WindowsUpdateFileList.ps1
Last active November 12, 2019 16:23
PowerShell cmdlets to get WindowsUpdate patch file List.
#Requires –Version 3
#Get WindowsUpdate List for offline patch
function Get-WindowsUpdateFileList
{
param(
[Parameter(Mandatory=$True)]
[string] $Filter
)
$objSession = New-Object -ComObject "Microsoft.Update.Session"
@mehdichaouch
mehdichaouch / Arte+7_Video_Downloader_-_GreaseMonkey.js
Created September 21, 2013 20:43
Script GreaseMonkey qui aide à trouver les urls (RTMP) des vidéos des replays sur ARTE+7 afin de les downloader avec rtmpdump o/
// ==UserScript==
// @name ARTE+7 Video Downloader vAlpha
// @namespace http://userscripts.org/users/80029 ; http://code.google.com/p/arte-tv-greasemonkey/
// @description ARTE+7 Video Downloader : Currently this UserScript is able to find the RTMP video links of Arte+7 to be downloaded with
// @include http*://videos.arte.tv/*
// @include http*://videos.arte.tv/de/videos/*
// @include http*://videos.arte.tv/en/videos/*
// @include http*://videos.arte.tv/fr/videos/*
// ==/UserScript==
@bluSch
bluSch / Windows Key rebindings
Last active September 2, 2021 13:21
Windows Key rebindings
# To use these, copy one section beginning with 'Windows Registry' and down to the next Comment
# in a .reg file and execute it on windows. Capslock to ctrl worked for me on Windows 7,
# and these should work on most versions of windows.
# Turn capslock into ctrl
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
@ganeshv
ganeshv / README.md
Last active August 13, 2017 13:04
Browserified cheerio.js.

Browserified Cheerio

Manually browserified cheerio.js. Edit 3 files, one in cheerio itself and two dependencies - lib/cheerio.js, - node_modules/domutils/index.js - node_modules/entities/index.js to replace dynamic "require" lines with static equivalents. Holds up to simple hand testing. cheerio is exposed in the browser as a global (window.cheerio).