Skip to content

Instantly share code, notes, and snippets.

View Gimanua's full-sized avatar

Adrian Klasson Gimanua

View GitHub Profile
@Gimanua
Gimanua / Program.cs
Last active September 26, 2017 11:23
C# Gissningsspel
using System;
class Program
{
static void Main(string[] args)
{
Random rnd = new Random();
int numb = rnd.Next(1, 101);
int guess, guesses = 0;
Console.WriteLine("Gissa på ett tal mellan 1-100");
const util = require('util');
const axios = require('axios').default;
const customAxios = axios.create({
baseURL: 'http://localhost:3000',
headers: { 'Content-Type': 'application/json' }
});
const maxRetries = 5;
let currentRetry = 0;
@Gimanua
Gimanua / base64.lua
Last active August 6, 2023 13:43
Computercraft Teletext
--[[
base64 -- v1.5.3 public domain Lua base64 encoder/decoder
no warranty implied; use at your own risk
Needs bit32.extract function. If not present it's implemented using BitOp
or Lua 5.3 native bit operators. For Lua 5.1 fallbacks to pure Lua
implementation inspired by Rici Lake's post:
http://ricilake.blogspot.co.uk/2007/10/iterating-bits-in-lua.html