Skip to content

Instantly share code, notes, and snippets.

@poemdexter
poemdexter / covid.py
Created April 7, 2022 17:24
calculate the percent chance a room of people is covid free
d = float(raw_input("daily cases per 100k: "))
u = float(raw_input("percentage unreported: "))
i = int(raw_input("days of infectious period: "))
c = int(raw_input("amount of people in room: "))
p = 1 (((d + (d * (u / 100))) * i) / 100000)
chance = (p ** c) * 100
print("percent chance a room of " + str(c) + " is covid free: " + str(chance))
@poemdexter
poemdexter / setup.md
Last active April 27, 2021 16:15
new osx setup
@poemdexter
poemdexter / monokai.terminal
Created April 27, 2021 15:54
monokai terminal profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxARElVO
U1JHQlxOU0NvbG9yU3BhY2VWJGNsYXNzRjAgMCAwABABgALSFBUWF1okY2xhc3NuYW1l
WCRjbGFzc2VzV05TQ29sb3KiFhhYTlNPYmplY3QIERokKTI3SUxRU1ddZGp3foWHiY6Z
<?xml version="1.0" encoding="utf-8"?><UserProfile><achievementsList>KillEliteMonster CompleteTeleporter CompleteThreeStages FailShrineChance LoopOnce StayAlive1 Discover10UniqueTier1 CompleteUnknownEnding RepeatedlyDuplicateItems Discover5Equipment TotalMoneyCollected Die5Times RepeatFirstTeleporter KillBossQuick Complete30StagesCareer AttackSpeed MaxHealingShrine FindTimedChest TotalDronesRepaired KillTotalEnemies MoveSpeed HardHitter CompleteTeleporterWithoutInjury MajorMultikill KillElementalLemurians CompleteMultiBossShrine LogCollector ChargeTeleporterWhileNearDeath FreeMage CompletePrismaticTrial FindDevilAltar CompleteThreeStagesWithoutHealing CarryLunarItems Complete20Stages FindUniqueNewtStatues SuicideHermitCrabs HardEliteBossKill UseThreePortals KillElitesMilestone RescueTreebot KillGoldTitanInOneCycle</achievementsList><coins>496</coins><discoveredPickups>ItemIndex.Syringe ItemIndex.Bear ItemIndex.Behemoth ItemIndex.Missile ItemIndex.ExplodeOnDeath ItemIndex.Dagger ItemIndex.Tooth ItemIndex.CritG
@poemdexter
poemdexter / howto.md
Created April 13, 2019 18:10
How to unlock all achievements/items and get more lunar coins in Risk of Rain 2

Find xml

  1. Ensure the game is closed.

  2. Navigate to your Steam directory.

  3. Navigate to the xml. Risk of Rain 2 is game id 632360. The path should look something like this:

     Steam\userdata\<userid>\632360\remote\UserProfiles\<hash>.xml
    

Lunar Coins

@poemdexter
poemdexter / .bash_profile
Last active April 27, 2021 15:50
bash profile for osx
# aliases
alias ll='ls -al'
alias g='./gradlew'
alias check8080='lsof -i -n -P | grep TCP | grep 8080'
# lol osx
export BASH_SILENCE_DEPRECATION_WARNING=1
# colors plz
set TERM xterm-256color; export TERM
@poemdexter
poemdexter / PVP.txt
Created February 22, 2017 03:04
get current ranking wow pvp
/script P=(math.floor(GetPVPRankProgress(target)*10000))/100 W=UnitPVPRank("player") N=(W-6)*5000+5000*P/100 Q=(W-5)*5000-N*0.8 SendChatMessage("Rank Progress: "..P.."% ".."Current RP: "..N.." RP to next rank "..Q.."","emote")
boolean isValid = true;
if (isValid && expensiveCheck1()) { ... }
if (isValid && expensiveCheck2()) { ... }
// expensiveCheck1() and expensiveCheck2() should set isValid = false if needed to short circuit rest of validations
@poemdexter
poemdexter / .gitignore
Created May 27, 2016 15:29
.gitignore for unity
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
# Autogenerated VS/MD solution and project files
/*.csproj
/*.unityproj
/*.sln
/*.suo
@poemdexter
poemdexter / ian.cs
Last active March 7, 2016 16:07
flipping pixels something something for ian
/*
a 2D array can easily be represented by a standard array. given an array that has a size equal to a square number,
reverse the order of the "rows" into a new array without changing the order of the elementes in each row.
example:
oldArray newArray
row 1 [0,1,2 row 3 [6,7,8
row 2 3,4,5 --> row 2 3,4,5
row 3 6,7,8] row 1 0,1,2]
*/