Skip to content

Instantly share code, notes, and snippets.

View 2ajoyce's full-sized avatar

Aaron Joyce 2ajoyce

View GitHub Profile

Good Hackathon Techniques

  • Break the work into as many small pieces as possible and let one person handle each unique piece
  • Think super small microservices with a gateway to connect them all
  • Mock everything first and set it up for real afterwards
  • Have a CI/CD plan set up ahead of time so that builds and deploys to smoothly. <3 Docker
  • Bring people with the following skillsets
    • UI / UX Frontend Developer (This person is almost always required and will have constant work the whole hackathon)
    • Mobile Developer (May or may not be the same as the UI / UX Developer)
  • Backend Developer (It is frequently useful to run your own api for data collation or processing)
@2ajoyce
2ajoyce / AdvancedWindowSnap.ahk
Created June 14, 2022 00:40 — forked from AWMooreCO/AdvancedWindowSnap.ahk
Advanced Window Snap is a script for AutoHotKey that expands upon Windows built-in window-snapping hotkeys.
/**
* Advanced Window Snap
* Snaps the Active Window to one of nine different window positions.
*
* @author Andrew Moore <andrew+github@awmoore.com>
* @version 1.0
*/
/**
* SnapActiveWindow resizes and moves (snaps) the active window to a given position.
@2ajoyce
2ajoyce / self-signed-cert.md
Last active May 10, 2020 03:55
Steps to create a self signed cert for signing powershell scripts

Steps to create a self signed cert for signing powershell scripts

  1. Get the current date: $date_now = Get-Date
  2. Get the expiration date: $extended_date = $date_now.AddYears(3)
  3. Create the cert: $cert = New-SelfSignedCertificate -certstorelocation cert:\localmachine\root -dnsname website.local -notafter $extended_date -Type CodeSigningCert
  4. Create a password: $pwd = ConvertTo-SecureString -String 'PASSWORD' -Force -AsPlainText
  5. Get the path of the cert: $path = cert:\localMachine\root' + $cert.thumbprint`
  6. Export the cert so it can be imported as a Trusted Root Certificate: Export-PfxCertificate -cert $path -FilePath ~\powershellcert.pfx -Password $pwd
    1. You might be able to skip this step. Since it's created as root I'm not sure if exporting / importing is necessary
  7. Get the cert once it is imported: $cert = @(Get-ChildItem cert:\CurrentUser\root -codesigning)[0]
@2ajoyce
2ajoyce / packages.config
Created May 2, 2020 22:44
Home PC packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="audacity" />
<package id="autohotkey" />
<package id="blender" />
<package id="discord" />
<package id="ditto" />
<package id="firefox" />
<package id="flux" />
<package id="gimp" />
@2ajoyce
2ajoyce / relaxPy_setup-instructions.md
Created August 19, 2018 17:19
RelaxPy Setup Instructions

Setup Instructions

NOTE: Skip straight to step 6 if you have already installed python2.7.

  1. Install chocolatey Run this in a cmd prompt window. Make sure to right click the icon and use "Run as administrator" @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

  2. Open a new admin command prompt

  3. Install python

  • This step will use chocolatey to install python2 and python3 on your computer.
@2ajoyce
2ajoyce / SetupCmdAliases.reg
Created August 2, 2018 15:14
Makes a registry key for setting up cmd aliases on a new machine
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="%USERPROFILE%\\aliases.cmd"
@2ajoyce
2ajoyce / New Computer Setup.md
Last active August 2, 2018 15:17
Instructions for setting up a new laptop

Steps

  1. Make cmd aliases
  2. Make git bash aliases
    • Run certutil.exe -urlcache -split -f "https://gist.github.com/2ajoyce/9a82fb6858d262055981ebcc94d0de54/raw/" %USERPROFILE%\.bash_profile in the cmd prompt
  3. Install Chocolatey
  4. Install programs with chocolatey
  5. Run certutil.exe -urlcache -split -f "https://gist.github.com/2ajoyce/ae087a4107d8bae35b5f54c4f50e1cff/raw/" %USERPROFILE%\packages.config in the cmd prompt
@2ajoyce
2ajoyce / packages.config
Last active November 12, 2018 15:08
Installation file for chocolatey
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="sql-server-management-studio" />
<package id="autodesk-fusion360" />
<package id="autohotkey" />
<package id="spotify" />
<package id="ditto" />
<package id="dotnet4.5" />
<package id="dotnetcore-sdk" />
<package id="filezilla" />
@2ajoyce
2ajoyce / aliases.cmd
Last active August 2, 2018 14:52
Aliases on windows cmd
@echo off
:: Save this file as %USERPROFILE%\aliases.bat
:: Run regedit and go to HKEY_CURRENT_USER\Software\Microsoft\Command Processor
:: Add String Value entry with the name AutoRun and the full path of your .bat/.cmd file.
:: Copied from: https://stackoverflow.com/questions/20530996/aliases-in-windows-command-prompt
DOSKEY ls=dir /B
DOSKEY ll=dir
class Player {
constructor() {
this.health = 20;
this.healing = false;
}
playTurn(warrior) {
if (warrior.health() > 12 && !this.healing) {
this.sense(warrior);
} else if (warrior.health() < this.health) {