;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
;by doppelganger ([email protected]) | |
;This file is provided for your own use as-is. It will require the character rom data | |
;and an iNES file header to get it to work. | |
;There are so many people I have to thank for this, that taking all the credit for | |
;myself would be an unforgivable act of arrogance. Without their help this would | |
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
int take_magic_damage(int health, int resist, int amp, int spell_power) { | |
int full_damage = spell_power * amp; | |
int damage_taken = full_damage - resist; | |
return health - damage_taken; | |
} |
// Kept the example run as-is, with the following exceptions: | |
// 1. Changed "let" to "var" | |
// 2. Added "new" on line 7 | |
// 3. Added semicolons to the statements | |
// Create a new fruit stand | |
var stand = new FruitStand(); | |
// Add fruits to the stand | |
stand.addFruit("apple", 10, 0.5); |
using System.Text; | |
IEnumerable<int> onlyEvens(IEnumerable<int> list) => list.Where(i => i % 2 == 0).OrderBy(i => i); | |
void Dump(IEnumerable<int> list) | |
{ | |
var sb = new StringBuilder(); | |
sb.Append("["); | |
sb.Append(string.Join(", ", list.Select(i => i.ToString()))); | |
sb.Append("]"); |
using System.Text.Json; | |
using TwitterApiLibrary; | |
using TwitterApiLibrary.OAuth; | |
/* | |
* Credentials | |
* ----------- | |
* 1. Go to the Twitter Developer Portal and create a new application. | |
* 2. Edit the User authentication settings | |
* App permissions: Read and write |
After getting it up and running, I sent a quick toot about having .NET 7 running on my FreeBSD VM. It got a lot of boosts and favorites.
To make the process easier for others and to make sure credit is given where due, I decided to make this little gist.
I did nothing here but find the right bits of instructions and follow them. It looks like Thefrank and sec are the driving forces behind getting .NET working on FreeBSD. More information is on the FreeBSD wiki's .NET page.
A few months back, I wrote a simple little Windows desktop application using WPF. It's built for .NET Framework 4.5, which means it should run in 4.5 through 4.8 without any issues. Outside of some core .NET assemblies and the WPF ones, it has a whopping three dependencies:
- Genesyslab.Sip.Endpoint.dll
- Genesyslab.Sip.Endpoint.Provider.Genesys.dll
- Newtonsoft.Json.dll
This application has been used internally on my network, internally on the other half of the company's network (we had a big merger, the networks are linked but only enough to get the important things working on both sides), and internally on some vendor networks. At launch, it connects to a web service of mine to pull down configuration stuff, and user-selected options then dictate what Genesys servers those first two dependencies connect to. Nice and simple.
<Query Kind="Program" /> | |
void Main() | |
{ | |
sameDigits(1); | |
sameDigits(10); | |
sameDigits(251894); | |
sameDigits(251895); | |
} |
#!/bin/ksh | |
# Cobbled together using https://www.romanzolotarev.com/random.html | |
# and https://docstore.mik.ua/orelly/unix3/korn/appb_11.htm | |
CHARS=' -~' | |
SIZE=20 | |
USAGE="as#" | |
while getopts "$USAGE" opt; do |