Skip to content

Instantly share code, notes, and snippets.

View ArcticLight's full-sized avatar
🍎

Matthew Clive ArcticLight

🍎
View GitHub Profile
@ArcticLight
ArcticLight / index.js
Created October 1, 2019 02:47
For Forceh
const rows = [];
const filteredRows = [];
for (let i = 0; i < 100; i++) {
rows.push({
text: "I'm a row!",
id: (i * 1000).toString(32),
});
}
const DEFAULT_BATCH_SIZE = 15;
#!/usr/bin/env bash
if tmux list-sessions ; then
tmux new-window "bash -c \"export STARTUP_DIRT=$(pwd); zsh\""
tmux a
else
tmux new-session "bash -c \"export STARTUP_DIRT=$(pwd); zsh\""
fi
@ArcticLight
ArcticLight / Minesweeper.scala
Created December 14, 2016 05:01
A really dumb implementation of Minesweeper
package me.arcticlight.minesweeper
import scala.collection.mutable
import scala.io.StdIn
/**
* Created by bogos on 12/13/2016.
*/
object Minesweeper {
package me.arcticlight.cs.databases
import me.arcticlight.animations.Eases
import me.arcticlight.animations.ScalaTween.{Animatable, AnimationTarget, ParTimeline, SeqTimeline, Tween}
import me.arcticlight.animations.ScalaTween.DefaultInterpolations._
import me.arcticlight.cs.databases.Animatables.Color
import me.arcticlight.cs.databases.Animatables.StockAnimations.TDelay
import processing.core.{PGraphics, PShape}
/**
package me.arcticlight.cs.databases
import me.arcticlight.animations.Eases
import scala.languageFeature.implicitConversions
import me.arcticlight.animations.ScalaTween._
import me.arcticlight.cs.databases.Animatables.PVectorIsVectorLike
import me.arcticlight.animations.ScalaTween.DefaultInterpolations._
import me.arcticlight.cs.databases.Animatables.Color
import processing.core.{PConstants, PGraphics, PVector}
@ArcticLight
ArcticLight / Event.scala
Last active August 29, 2015 14:24 — forked from hawkw/Event.scala
///////////////////////////////////////////////////////////////////////
// TOP SECRET METEORCODE ENGINEERING BULLSHIT -- DO NOT STEAL //
// (c) Hawk Weisman, all rights reserved 'n' stuff //
///////////////////////////////////////////////////////////////////////
type Payload: Map[String,Object]
abstract class Event (
protected val payload: Payload,
protected var valid: Boolean = true
) extends (Payload)(prefunc: (Payload) => Boolean = {
@ArcticLight
ArcticLight / codesample-bind.js
Created June 4, 2015 23:34
Example of what Bind() does in Javascript
var unbound = function() {
console.log(this.seven);
}
unbound(); //Nothing: seven isn't defined.
var ThisIsSeven = {
"seven": 7
};
@ArcticLight
ArcticLight / frob.js
Last active August 29, 2015 14:20
CSS Animations + Javascript = Hell
// This is a snippet that may or may not eventually make it live to my wobsite.
// This is the shortest code I currently know how to write that triggers my
// in/out animations correctly on toggle - every time - in the browser.
// The "Every Time" bit is the hardest bit.
function toggleReq() {
requirementsOpen = !requirementsOpen;
if(requirementsOpen) {
req.style.height=document.getElementById("reqcontent").offsetHeight+8+"px";
@ArcticLight
ArcticLight / segfaultClock
Created February 18, 2015 02:32
Wat the segfault
int lastS;
float munge;
void setup() {
size(300,300);
lastS = second();
munge = 0;
}
void draw() {
@ArcticLight
ArcticLight / USL.scala
Last active August 29, 2015 14:08
USL
/**
* USL - Useless Stack Language
*/
import scala.collection.mutable
object USL {
/********************
* Handling USL Data
********************/