Skip to content

Instantly share code, notes, and snippets.

View fortraan's full-sized avatar

fortraan

View GitHub Profile
@fortraan
fortraan / scat
Last active October 18, 2018 20:15
cat but with syntax highlighting
#!/bin/bash
# to install, download this file to /usr/local/bin and make sure the execute bit is enabled.
highlight -O xterm256 $1
@fortraan
fortraan / AsyncTask.java
Last active January 27, 2019 19:24
Lightweight asynchronous tasks for Java 1.9
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
/**
* Lightweight lambda-based async. Tasks can be chained together using
* {@link #andThen(AsyncTask, long)}, with a delay between them.
*
* If you don't want arguments, make T {@link Void}, then pass null to
@fortraan
fortraan / BasicPushbot_v4.java
Created November 7, 2017 05:46
Fixed BasicPushbot_v4
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.Servo;
/**
* Created by Administrator on 9/29/2017.
*/