Skip to content

Instantly share code, notes, and snippets.

View tgoyer's full-sized avatar

Tim Goyer tgoyer

View GitHub Profile
1. diskutil list
2. diskutil eraseDisk MS-DOS "WIN10" GPT /dev/disk2
3. hdiutil mount ~/Downloads/Win10_2004_English_x64.iso
4. rsync -vha --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WIN10
5a. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
5b. brew install wimlib
5c. mkdir /Volumes/WIN10/sources
6. wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 4000
@tgoyer
tgoyer / howto_python_flask_iis_wfastcgi.md
Last active April 8, 2020 21:42 — forked from dvas0004/howto_python_flask_iis_wfastcgi.md
Python Flask on IIS with wfastcgi

Assume IIS is installed. My machine already had IIs 8.5.

DV : Adding some notes when using MS IIS Express 10

Install Python

  1. Download web installer (Python 3.x 64-bit).
  2. Run as Administrator.
  3. Select custom installation for all users.
  4. Choose install directory such that there are no white spaces in the path. Not sure if it needs to be done. Just being cautious.
@tgoyer
tgoyer / gist:0d8ce701fa0c10c46411f4883249fe2a
Last active February 8, 2018 03:34
Bitwise Flags Class with example
class Flag {
constructor() {
this.value = 0;
}
add(flag) {
this.value = this.value | flag;
}
remove(flag) {
@tgoyer
tgoyer / gist:13f708690f10a84ea1c8fda642f1d601
Last active March 8, 2017 16:33
React Form Component example
class FormContainer extends React.Component {
constructor(props) {
super(props)
this.state = {
formData: null
}
}
formSubmit = (evt) => {
const form = evt.target,
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();
@tgoyer
tgoyer / Test Database Connection
Last active January 26, 2016 05:26
Test Database Connection. Pass in flushData == true into init() rebuild test data.
var mongoose = require('mongoose'),
config = require('./config');
module.exports = {
init: function(flushData) {
mongoose.connect(config.database.mongoUri, function() {
console.log('MONGODB: Connected.');
});
mongoose.connection.on('open', function() {
@tgoyer
tgoyer / Easy Load Data with Mongoose
Last active January 26, 2016 05:12
Load Data into Mongo / Mongoose using Groceries as an example.
var GroceryItem = require('./model.groceryitem.js');
module.exports = {
load: function() {
[{
name: 'Chips',
purchased: false
}, {
name: "Ice Cream",
purchased: false