Skip to content

Instantly share code, notes, and snippets.

using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
/// <summary>
/// Crit Calculator for https://www.reddit.com/r/dailyprogrammer/comments/4nvrnx/20160613_challenge_271_easy_critical_hit/
/// wrote a caclculator for the crit calculator, and did some unit tests for it as well.
/// </summary>
namespace CritCalculator
{
class TestCritCalculator
using System;
using System.Collections.Generic;
namespace MakingWaves
{
internal class Program
{
private static void Main(string[] args)
{
WaveForm a = new WaveForm(8000, 300, "ABCDEFG_GFEDCBA", @"c:\waveyWave.wav");
@Noofbiz
Noofbiz / intensityToRGB.go
Created July 29, 2016 19:12
Intensity numbers to RGB
func intensityToRGB(i int) (r int, g int, b int){
region := i / 256
remainder := i % 256
switch region {
case 0:
r, b = 0, 255
g = remainder
case 1:
r, g = 0, 255
b = 255 - remainder
@Noofbiz
Noofbiz / JSONRestAPI.go
Created May 22, 2017 20:16
Playing around with JSON APIs and making http POST requests in Go
package main
import (
"fmt"
"encoding/json"
"net/http"
"io/ioutil"
"bytes"
)
@Noofbiz
Noofbiz / ImageScaleBG.go
Created June 7, 2017 17:47
Takes all the pictures in the folder in, scales the image while maintaining aspect ratio as big as it can without exceeding 650 x 350, and then creates a 700 x 400 image of the same name in the out folder with a black background.
package main
import (
"image/color"
"io/ioutil"
"log"
"github.com/disintegration/imaging"
)
@Noofbiz
Noofbiz / fontIssue.go
Created August 5, 2017 05:50
Engo Font Issue test
package main
import (
"image/color"
"log"
"engo.io/ecs"
"engo.io/engo"
"engo.io/engo/common"
)
@Noofbiz
Noofbiz / keyModifiers.go
Created November 26, 2017 14:58
Handling modifier keys in Engo maybe?
package main
import (
"fmt"
"engo.io/ecs"
"engo.io/engo"
"engo.io/engo/common"
)
@Noofbiz
Noofbiz / triangle.go
Created October 26, 2018 16:11
Drew a triangle with Vulkan!
package main
import (
"errors"
"fmt"
"io/ioutil"
"math"
"os"
"runtime"
"time"
@Noofbiz
Noofbiz / main.go
Last active December 8, 2018 21:57
a script built in go that attempts to run tests then build engo demos to test if changes break the build
package main
import (
"bytes"
"flag"
"fmt"
"go/build"
"io/ioutil"
"os"
"os/exec"
package main
import (
"fmt"
"image"
"image/color"
"math/rand"
"sync"
"time"