Skip to content

Instantly share code, notes, and snippets.

/**
* Adapted from https://github.com/Daninet/hash-wasm
*
* Copyright (c) 2020 Dani Biró, MIT license
*/
const rawWasm = {
name: 'sha256',
data: 'AGFzbQEAAAABEQRgAAF/YAF/AGACf38AYAAAAwgHAAEBAgMAAgQFAXABAQEFBAEBAgIGDgJ/AUHwiQULfwBBgAgLB3AIBm1lbW9yeQIADkhhc2hfR2V0QnVmZmVyAAAJSGFzaF9Jbml0AAELSGFzaF9VcGRhdGUAAgpIYXNoX0ZpbmFsAAQNSGFzaF9HZXRTdGF0ZQAFDkhhc2hfQ2FsY3VsYXRlAAYKU1RBVEVfU0laRQMBCuJIBwUAQYAJC50BAEEAQgA3A8CJAUEAQRxBICAAQeABRiIAGzYC6IkBQQBCp5/mp8b0k/2+f0Krs4/8kaOz8NsAIAAbNwPgiQFBAEKxloD+n6KFrOgAQv+kuYjFkdqCm38gABs3A9iJAUEAQpe6w4OTp5aHd0Ly5rvjo6f9p6V/IAAbNwPQiQFBAELYvZaI/KC1vjZC58yn0NbQ67O7fyAAGzcDyIkBC4ACAgF+Bn9BAEEAKQPAiQEiASAArXw3A8CJAQJAAkACQCABp0E/cSICDQBBgAkhAgwBCwJAIABBwAAgAmsiAyADIABLIgQbIgVFDQAgAkGAiQFqIQZBACECQQAhBwNAIAYgAmogAkGACWotAAA6AAAgBSAHQQFqIgdB/wFxIgJLDQALCyAEDQFByIkBQYCJARADIAAgA2shACADQYAJaiECCwJAIABBwABJDQADQEHIiQEgAhADIAJBwABqIQIgAEFAaiIAQT9LDQALCyAARQ0AQQAhB0EAIQUDQCAHQYCJAWogAiAHai0AADoAACAAIAVBAWoiBUH/AXEiB0sNAAsLC5M+AUV/IAAgASgCPCICQRh0IAJBCHRBgID8B3FyIAJBCHZBgP4DcSACQRh2cnI

Keybase proof

I hereby claim:

  • I am coyotte508 on github.
  • I am coyotte508 (https://keybase.io/coyotte508) on keybase.
  • I have a public key ASCXwqWThIYcbQLuaIAXe-4v-17iPKLyCyxDiLYGGIo4NAo

To claim this, I am signing this object:

/* eslint-disable github/array-foreach */
const bytes = new Uint8Array(10_000);
for (let i = 0; i < bytes.length; i++) {
bytes[i] = Math.floor(Math.random() * 256);
}
const set = new Set();
const ITERATIONS = 100_000;
<script lang="ts">
import { classnames } from '@/utils';
import { Pagination, PaginationItem, PaginationLink } from 'sveltestrap';
export let align: "right" | "left" | "center" | undefined = undefined
export let title = "Pagination"
export let count: number
export let perPage: number
export let currentPage = 0
let className = ""
use std::io::{stdin, stdout, Write};
fn main() {
let stdin = stdin();
let mut stdout = stdout();
let to_guess = String::from("BENEDICT");
let mut letters: u128 = 0;
{"players":[{"player":0,"faction":"ambas","data":{"victoryPoints":71,"credits":14,"ores":7,"qics":3,"knowledge":3,"power":{"area1":1,"area2":0,"area3":6,"gaia":0},"research":{"terra":5,"nav":4,"int":0,"gaia":0,"eco":0,"sci":0,"trade":5,"ship":2},"range":3,"gaiaformers":0,"gaiaformersInGaia":0,"terraformCostDiscount":2,"tiles":{"booster":"booster9","techs":[{"tile":"tech-ship0","pos":"move","enabled":true},{"tile":"tech8","pos":"free2","enabled":true},{"tile":"tech5","pos":"nav","enabled":true},{"tile":"tech3","pos":"free4","enabled":true},{"tile":"tech1","pos":"ship","enabled":true},{"tile":"tech-ship1","pos":"terra","enabled":true},{"tile":"tech-ship3","pos":"free1","enabled":true}],"federations":[{"tile":"fed3","green":false},{"tile":"fed3","green":false},{"tile":"fed6","green":true},{"tile":"fed5","green":true}]},"satellites":8,"brainstone":null,"leechPossible":0,"tokenModifier":1,"buildings":{"m":6,"ts":1,"lab":2,"PI":1,"ac1":1,"ac2":0,"gf":0,"sp":0},"federationCount":3,"lostPlanet":0,"shipLocations":[],"
@coyotte508
coyotte508 / upgrading.md
Created August 6, 2018 19:54
Upgrading

When doing a fresh install, yarn takes the latest versions of the packages according to semver.

Then it creates a yarn.lock file, and won't upgrade the packages anymore.

Yarn upgrade only upgrades the modules installed locally. It has no effect for anybody else as it does not modify package.json.

Upgrading gaia-engine on the website

Option 1

var Transform = require('stream').Transform;
class StreamConcat extends Transform {
constructor(streams, options) {
super(options);
this.streams = streams;
this.canAddStream = true;
this.currentStream = null;
this.streamIndex = 0;
#include <pythran/pythran.h>
/* Module name, function name, argument types */
pythran_export_solo(test, init, int)
#include "test.cpp"
namespace test = namespace __pythran_test;
int main() {
@coyotte508
coyotte508 / test.py
Last active December 31, 2015 10:39
#pythran export run()
def init(x):
global a
a = x
def show():
print(a)
def run():