Skip to content

Instantly share code, notes, and snippets.

View evanextreme's full-sized avatar
🛠️
building reclaimer

Evan Hirsh evanextreme

🛠️
building reclaimer
View GitHub Profile
@evanextreme
evanextreme / ewsh.ps1
Last active November 15, 2022 20:47
extremeshell (nice pwsh env for windows containers)
Install-Module -Name Terminal-Icons -Force
Import-Module -Name Terminal-Icons
# Keys for anywhere
function Get-CD { Set-Location $args[0]; Get-LS }
Set-Alias -Name cd -Value Get-CD -Option AllScope
function Get-LS { Get-ChildItem -Path $args[0] -Force | Format-Wide -AutoSize }
Set-Alias -Name ls -Value Get-LS -Option AllScope
Set-Alias -Name ll -Value ls
@evanextreme
evanextreme / clustotron4000.py
Last active April 17, 2020 17:22
why in the hell are you making me manually run through kmeans
from sklearn.cluster import KMeans
import numpy as np
user_input = None
row = 0
points = []
k = int(input('Size of K: '))
it = int(input('# of iterations to run (probably 1 or 2): '))
print('Input your points as 2 comma separated numbers (example: "2,3")')
@evanextreme
evanextreme / keys
Last active February 22, 2020 23:35
pubs
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqtt/2Qd6nod7o3IuV9o2ra3y4YY5j5oTIcApJGqzDrY0AZR6ozhj9bfBWIdT9vn/Rc5/VQ8zljhwiwJMUOtb714/3oo6JPGnJqq+eGv9ucS+yS4IsbK/PlDEdxKbslqodc7MRnJFH1XkNXfDORtOQN2uCfu4ZxW5AN1e0UdP+p2b9BDJldsDcejqFyeE2ujNc1x1DTvf+5AB59MC+olmeHjo4KEo+VeI4gsc+YLoTVX67oitMx9sPi8BGxwcdGPfRhCD6knwKm6oZpBT2HaKCBUVER5yZyPXG+lNT8KlsDEletekC3Y+H2vHSN9dGFRjCVJ+Sm8KJFaLWnUDBbLE1 evan@EHirshDesktop
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDrq1Y2NXzeKKBckFnm8UZrklzVYnjegStDpS1B694LFT8UddRHO4wVS92poEteOfdlXhU7xvZ2yLHdywvljMiGbQJBI0Ex6gX8cQ2b+a7vXgMPgn9+OpaY9fumCcbAvThQ/3/9+fOIb6+A6J/M3CJmAB7FyetL7H5he7xZViu52W5xrTH6JcP/qCpePdbnmxFANol1lcfOjyahwHXSkh3nl4lbhVG5SlVJRPZRl+oAQl6xhcKeQR+20DA0ZrWLeJDkdKAIjUu1FceeZmnDpS+qDys8tvQ0wz3bV9lt4DXKimCmwWK/TTztHouGROQ3kryisIukO0nk376RjoX6yJ4Z evan@ehirshlaptop4.lan
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDxZiYwBCmfLcxszfaUrCa6pjqcJ/if20aoMzaJPMdTrb2LaNLgyOlTI81TBh8zJ7Biu44y1HS7H+ZRIWjcDJI5kokcRVl96y7RswOCVwVvFxma4qzWHD4UysDSxzzjgRRod4q/XKia6R9Dm1iMaipKQmggH8UVyECKqEeEGXWJ8eC7CuHnOTpR
@evanextreme
evanextreme / swap.sh
Created April 22, 2019 17:46
creates 1gb swap on a host
#!/bin/bash
sudo fallocate -l 1G /swapfile;
chmod 600 /swapfile;
mkswap /swapfile;
swapon /swapfile;
echo "/swapfile none swap sw 0 0" >> /etc/fstab;
@evanextreme
evanextreme / dance.py
Last active April 24, 2019 02:21
:DDance::ADance::NDance::CDance::EDance: :DDance::ODance::TDance: :PDance::YDance:
import pyperclip
message = input('Enter message: ')
outMessage = ''
for l in message:
if l.isalpha():
outMessage += ':{}Dance:'.format(l.upper())
elif l == ' ':
outMessage += ' '
else:
@evanextreme
evanextreme / brew-sync.sh
Created December 1, 2017 20:08 — forked from jpawlowski/brew-sync.sh
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*

Keybase proof

I hereby claim:

  • I am evanextreme on github.
  • I am evanextreme (https://keybase.io/evanextreme) on keybase.
  • I have a public key ASD_ck8CwA-xNnV3BauFwrB8tL_jJuL1qiY3p30lwtNH-Ao

To claim this, I am signing this object: