Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using System.Collections;
public class NetworkInterpolatedTransform : MonoBehaviour
{
public double interpolationBackTime = 0.1;
internal struct State
{
internal double timestamp;
@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
@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 / TileManager.cs
Last active December 23, 2019 16:27
Representing a 2D array as a 1D array with wrapping sides (up at top of 1st column will place you bottom of 1st column)
using UnityEngine;
using System.Collections;
public class TileManager : MonoBehaviour
{
public GameObject walkableTile;
public GameObject blockingTile;
private GameObject[] tiles = new GameObject[25];
public int offset = 0; // current position on grid array
<?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 / 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")
@poemdexter
poemdexter / .screenrc
Created November 1, 2013 15:01
do the cool screen thing that david welborn showed me.
# Supress screen's startup message
startup_message off
# Define a bigger scrollback, default is 100 lines
defscrollback 10000
# An alternative hardstatus to display a bar at the bottom listing
# the windownames and highlighting the current windowname in blue.
hardstatus alwayslastline "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H%{..Y} %m/%d %C%a "