Skip to content

Instantly share code, notes, and snippets.

@gregmajor
gregmajor / wordlist.txt
Created June 27, 2018 18:39
Mnemonic Word List
From http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html
Word selection criteria:
- The wordlist contains 1626 words.
- All words are between 4 and 7 letters long.
- No word in the list is a prefix of another word (e.g. visit, visitor).
- Five letter prefixes of words are sufficient to be unique.
The rest of the criteria are less strict. You may find exceptions to all of them because it is difficult to satisfy them all at the same time.
- The words should be usable by people all over the world. The list is far from perfect in that respect. It is heavily biased towards western culture and English in particular. The international vocabulary is simply not big enough. One can argue that even words like "hotel" or "radio" are not truly international. You will find many English words in the list but I have tried to limit them to words that are part of a beginner's vocabulary or words that have close relatives in other european languages. In some cases a word has a different meaning
@gregmajor
gregmajor / boxstarter.ps1
Last active August 2, 2017 16:12
Boxstarter Script
# http://boxstarter.org/Learn/WebLauncher
# To use, run this command and fill in the RAW_FILE_URL
# Install-BoxstarterPackage -PackageName RAW_FILE_URL -DisableReboots
# See http://boxstarter.org/WinConfig for all the Boxstarter extras
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
Install-WindowsUpdate
Disable-InternetExplorerESC
@gregmajor
gregmajor / keybase.md
Created April 19, 2015 04:15
Keybase Proof

Keybase proof

I hereby claim:

  • I am gregmajor on github.
  • I am gregmajor (https://keybase.io/gregmajor) on keybase.
  • I have a public key whose fingerprint is 9C47 D565 A9F4 BBE7 EB19 CFB2 B7D1 F23A 5405 60EF

To claim this, I am signing this object:

@gregmajor
gregmajor / get-fileversion.ps1
Last active August 29, 2015 14:18
Get File Versions with Powershell
# Credit to https://jtruher3.wordpress.com/2006/05/14/powershell-and-file-version-information/
param ( [string[]]$paths )
begin {
# I want to do some stuff with relative paths.
# create a variable that I can use later
$P = [string](get-location)
# the workhorse of the script
function GetVersionInfo
@gregmajor
gregmajor / StateDerivedStatus.cs
Created August 25, 2012 20:00
State Derived Status
/*
* STATE DERIVED STATUS
* - What is status?
*/
using System;
class Program
{
static void Main(string[] args)
@gregmajor
gregmajor / StateVsStrategy.cs
Created August 25, 2012 19:59
State vs Strategy
/*
* STATE VS STRATEGY
* - Strategy lets the algorithm vary independently from clients that use it
* - The difference is internal vs external
*/
using System;
class Program
{
@gregmajor
gregmajor / DogStatePatternExample.cs
Created August 25, 2012 19:59
Dog State Pattern Example
/*
* HERE BOY!
* - Notice how behavior changes based on state.
*/
using System;
class Program
{
static void Main(string[] args)
@gregmajor
gregmajor / StatePatternExample.cs
Created August 25, 2012 19:58
State Pattern Example
/*
* THE STATE PATTERN
* - Allows an object to alter its behavior when its internal state changes
* - The object "transforms" and appears to be completely different
*/
using System;
class Program
{
@gregmajor
gregmajor / CombinationLockIterationStateMachine.cs
Created August 25, 2012 19:57
Combination Lock using the Iteration State Machine
/*
* REVISITING THE COMBINATION LOCK
* - We can make our machine non-deterministic
*/
using System;
using System.Collections.Generic;
class Program
{
@gregmajor
gregmajor / IterationStateMachine.cs
Created August 25, 2012 19:56
Iteration State Machine
/*
* ITERATION AND STATE MACHINES
* - Review an iteration-based approach
* - Deterministic vs non-deterministic finite machines
* - What's up with that infinite loop?
*/
using System;
using System.Collections.Generic;