Skip to content

Instantly share code, notes, and snippets.

View jeffwilcox's full-sized avatar

Jeff Wilcox jeffwilcox

View GitHub Profile
@jeffwilcox
jeffwilcox / checkGraph.ts
Created June 4, 2021 14:30
Quick script to identify users that no longer resolved in the directory
//
// Copyright (c) Microsoft.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
import throat from 'throat';
import app from '../../../app';
import { IProviders } from '../../../interfaces';
import { ErrorHelper } from '../../../transitional';
@jeffwilcox
jeffwilcox / generate-key-and-token.js
Created July 11, 2019 19:16
Generating a token in Node.js
// simple JavaScript (Node.js CLI) generating of a key and token
const crypto = require('crypto');
const myKey = crypto.randomBytes(32).toString('base64');
console.log('This is your key. Store is very securely, i.e. KeyVault:');
console.log(myKey);
console.log();
const sha1 = crypto.createHash('sha1');
sha1.update(myKey);
@jeffwilcox
jeffwilcox / sample-digest-data.json
Last active July 11, 2017 17:06
Sample digest data
[
{
"submitter": "jwilcox",
"reviewers": ["tim", "nikhil"],
"data": {
"componentName": "react",
"componentVersion": "15.6.1"
}
},
{
@jeffwilcox
jeffwilcox / deploy.cmd
Created February 24, 2017 17:20
Mail2Bug deployment script for a triggered WebJob deployment
@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.7
:: ----------------------
:: Prerequisites
:: -------------
@jeffwilcox
jeffwilcox / keybase.md
Created September 6, 2016 05:49
keybase.md

Keybase proof

I hereby claim:

  • I am jeffwilcox on github.
  • I am jeffwilcox (https://keybase.io/jeffwilcox) on keybase.
  • I have a public key ASBuEKl7kirZR3CekzozA9tkXJY4hr4oL_qrANuKEU5iMAo

To claim this, I am signing this object:

@jeffwilcox
jeffwilcox / apache2-copyright-header.js
Last active June 12, 2023 19:56
Sample Microsoft headers for use in open source projects
@jeffwilcox
jeffwilcox / mit-copyright-header.js
Last active November 19, 2015 19:12
Copyright Header - MIT
@jeffwilcox
jeffwilcox / setupMongoNode.sh
Last active December 18, 2015 22:39
Bash script for bringing online a node in a MongoDB cluster powered by Windows Azure IaaS VMs
#!/bin/bash
#
# Copyright (c) Microsoft. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@jeffwilcox
jeffwilcox / updown.js
Created June 21, 2013 20:07
Simple wrapper over the azure npm module for uploading and downloading blobs
// Simple wrapper over APIs for uploading and downloading blobs from Windows Azure Storage
// by Jeff Wilcox. Apache 2 license, have fun with it.
var azure = require('azure')
, fs = require('fs');
if (process.argv.length < 3) {
console.log('Please call with the proper arguments.');
console.log('node updown.js ACCOUNT KEY CONTAINER up FILENAME');
console.log('node updown.js ACCOUNT KEY CONTAINER down FILENAME');