Skip to content

Instantly share code, notes, and snippets.

View minecrawler's full-sized avatar

Maru Alka minecrawler

View GitHub Profile
@minecrawler
minecrawler / main.rs
Created March 22, 2017 00:40
Simple Snake implemented on top of Amethyst
extern crate rand;
extern crate amethyst;
use amethyst::{Application, Event, State, Trans, VirtualKeyCode, WindowEvent};
use amethyst::asset_manager::AssetManager;
use amethyst::config::Element;
use amethyst::ecs::{World, Join, VecStorage, Component, RunArg, System, Entity};
use amethyst::ecs::components::{Mesh, LocalTransform, Texture, Transform, Renderable};
use amethyst::gfx_device::DisplayConfig;
@minecrawler
minecrawler / main.cpp
Created August 8, 2017 13:12
Guess random number game
#include <chrono>
#include <iostream>
#include <random>
#include <string>
using namespace std;
using namespace std::chrono;
int main() {
int playerGuess = 0;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>loop over array</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
export class BaseElement extends HTMLElement {
dirty: boolean = true;
root: ShadowRoot;
constructor(hideInternals: boolean = true) {
super();
this.root = this.attachShadow({ mode: hideInternals ? 'closed' : 'open' });
const observer = new MutationObserver(() => {