Skip to content

Instantly share code, notes, and snippets.

View hakusaro's full-sized avatar

Lucas Nicodemus hakusaro

View GitHub Profile
@hakusaro
hakusaro / middle.cpp
Last active August 29, 2015 14:07
This stupid bit of code finds the middle of 3 values.
if (first < second && third > second || third < second && first > second)
middle = second;
if (third < first && second > first || second < first && third > first)
middle = first;
if (second < third && first > third || first < third && second > third)
middle = third;
Mono: Config attempting to parse: '/usr/local/Cellar/mono/3.12.0/lib/../etc/mono/config'.
Mono: Config attempting to parse: '/Users/shank/.mono/config'.
Mono: Assembly Loader probing location: '/usr/local/Cellar/mono/3.12.0/lib/mono/4.5/mscorlib.dll'.
Mono: Image addref mscorlib[0x7fc903417c60] -> /usr/local/Cellar/mono/3.12.0/lib/mono/4.5/mscorlib.dll[0x7fc904040400]: 2
Mono: Assembly Loader probing location: '/usr/local/Cellar/mono/3.12.0/lib/mono/4.5/mscorlib.dll'.
Mono: AOT: loaded AOT Module for /usr/local/Cellar/mono/3.12.0/lib/mono/4.5/mscorlib.dll.
Mono: Assembly Loader loaded assembly from location: '/usr/local/Cellar/mono/3.12.0/lib/mono/4.5/mscorlib.dll'.
Mono: Config attempting to parse: '/usr/local/Cellar/mono/3.12.0/lib/mono/4.5/mscorlib.dll.config'.
Mono: Config attempting to parse: '/usr/local/Cellar/mono/3.12.0/lib/../etc/mono/assemblies/mscorlib/mscorlib.config'.
@hakusaro
hakusaro / in the past.md
Created March 29, 2015 06:18
How to commit in the past

To commit in the past...you need to be creative and get a repo where you can commit to.

  • $ export GIT_AUTHOR_DATE="Sat, 28 Mar 2015 22:00:00 -0700"
  • $ export GIT_COMMIT_DATE="Sat, 28 Mar 2015 22:00:00 -0700"
  • $ git commit -m "commit in the past"

Save those github streaks when you're off by only a few minutes.

Focus?
nicatrontg [12:24 AM]
So since there are so few of us here
nicatrontg [12:24 AM]
any consensus on doing a weekly news feature? (edited)
nicatrontg [12:24 AM]
maybe a news post every week with “funny quotes from slack,” development notes, etc?

Definitive guide to WH Strats

  1. Install Tampermonkey (Chrome) or Greasemonkey (Firefox).
  2. Install https://github.com/Pawsed/SteamMonsterAutoUpgradeManager/raw/master/upgrademanager.user.js as a user script. This is fancy. It auto-upgrades your stuff to whatever strat we're using at the time.
  3. Install https://raw.githubusercontent.com/wchill/steamSummerMinigame/master/autoPlay.user.js as a user script. There is also one floating around from SteamDB, that, at this time of writing, is kinda broken. If chat says SteamDB is not broken, feel free to use it. It has fancy auto-upgrades, so you don't need the first script if you choose it. Right now it's totally broken though.
  4. Find a room and join. You can only join games from the lobby. In Chrome, hit F12 to open the console, and type ```JoinGame(r
This file has been truncated, but you can view the full file.
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.GameContent.Achievements;
This file has been truncated, but you can view the full file.
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.GameContent.Achievements;
using Terraria.GameContent.Biomes;
using Terraria.GameContent.Events;
This file has been truncated, but you can view the full file.
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using Terraria.GameContent;
using Terraria.GameContent.Achievements;
using Terraria.Graphics.Shaders;
using Terraria.ID;
namespace Terraria
{
public class Projectile : Entity
@hakusaro
hakusaro / csv_to_readmeio.rb
Created November 3, 2015 08:15
This parses CSVs for inserting into raw data blocks on Readme.io. Don't have commas in your values or it will break. Alternatively, change the root separator to something like a semicolon.
require 'json'
if ARGV[0] == nil
abort "You moron, you forgot to give us a CSV."
end
data = {}
file = File.new(ARGV[0])

There are many good places to buy Chipotle burritos1.

Footnotes

  1. Just not in Wyoming.