Skip to content

Instantly share code, notes, and snippets.

View Wsiegenthaler's full-sized avatar

Weston Siegenthaler Wsiegenthaler

View GitHub Profile
@Wsiegenthaler
Wsiegenthaler / Install.md
Last active June 8, 2020 21:56
Mac Keyboard Shortcuts for Windows 10

Install Steps

  1. Download and install AutoHotKeys
  2. Disable WorkstationLock using regedit
  • This is needed so url bar focus (Cmd+L) works in browsers
  • Registry Path: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
  • Registry Key: DisableLockWorkstation
  • Registry Value: 1
  1. Download and execute MacKeyboard.ahk
@Wsiegenthaler
Wsiegenthaler / MBP-Keyboard-Replacement-Resources.md
Last active April 12, 2020 10:40
Macbook Pro - Keyboard Replacement Resources
@Wsiegenthaler
Wsiegenthaler / alass_morph.rs
Created December 30, 2019 23:41
Cleaning voice-activity data with "Mathematical Morphology"
/// Removes noise from voice-activity data resulting in cleaner and fewer timespans
fn clean_vad_data(data: &Vec<bool>, opening_radius: usize, closing_radius: usize) -> Vec<bool> {
// Clone voice-activity buffer and add padding
fn pad(data: &Vec<bool>, radius: usize) -> Vec<bool> {
let orig_len = data.len();
let clone_len = orig_len + radius * 2;
let mut clone = vec![false; clone_len];
clone.truncate(radius);
clone.extend_from_slice(&data);
@Wsiegenthaler
Wsiegenthaler / ad-user-flags.js
Created April 24, 2017 19:09
ActiveDirectory Account Locked/Disabled/Expired
var ActiveDirectory = require('activedirectory');
var ldap = require('ldapjs');
var lo = require('lodash');
var Promise = require('bluebird');
var ad = Promise.promisifyAll(new ActiveDirectory(...));
var userAccountFlags = [
{ name: 'SCRIPT', code: 0x0001 },
{ name: 'ACCOUNTDISABLE', code: 0x0002 },
/*global angular: true, google: true, _ : true */
'use strict';
angular.module('geocoder', ['ngStorage']).factory('Geocoder', function ($localStorage, $q, $timeout) {
var locations = $localStorage.locations ? JSON.parse($localStorage.locations) : {};
var queue = [];
// Amount of time (in milliseconds) to pause between each trip to the
<html>
<head>
<title>Printing with Page Breaks</title>
<meta charset="utf-8">
<style type="text/css">
@media screen or print {
div.pageb:last-child { display: block; page-break-after: avoid; }
div.pageb { display: block; page-break-after: always; }
}
</style>