Skip to content

Instantly share code, notes, and snippets.

✈️
Away

Keenan Thompson thekeenant

✈️
Away
Block or report user

Report or block thekeenant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View PrivacyPolicy.md

Information Collection And Use

For a better experience while using our Service, we may require you to provide us with certain personally identifiable information, including but not limited to your name, phone number, and postal address. The information that we collect will be used to contact or identify you.

@thekeenant
thekeenant / GdxScheduledExecutorService.java
Last active May 23, 2019
An implementation of ScheduledExecutorService for LibGDX which executes tasks on the main game thread.
View GdxScheduledExecutorService.java
import com.badlogic.gdx.Gdx;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
View monotone_interpolator.dart
import 'dart:math';
import 'dart:ui';
import 'package:meta/meta.dart';
@immutable
class MonotoneInterpolator {
const MonotoneInterpolator._(this.points, this._c1s, this._c2s, this._c3s);
final List<Offset> points;
View madgrades-diagram.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thekeenant
thekeenant / Derivatives.java
Last active Oct 17, 2019
Approximate the derivative of a function in Java.
View Derivatives.java
import java.util.function.DoubleFunction;
public class Derivatives {
// approximate the limit
private static final double DX = 0.0001;
/**
* @param f f(x), the function to derive
* @return f'(x), the derivative of the f(x)
*/
@thekeenant
thekeenant / The Technical Interview Cheat Sheet.md
Last active Sep 28, 2017 — forked from TSiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat Sheet.md

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

Array

Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@thekeenant
thekeenant / cs-resources.md
Last active Apr 17, 2019
My CS bookmarks.
View cs-resources.md

Cheatsheets

Learning & Practice

  • Pramp: Free forever peer-to-peer technical interview practice.
  • InterviewBit: Gamified practice for typical coding interview questions.
  • Project Euler: Math/CS related challenge problems. Try them and complete them at your own pace.
@thekeenant
thekeenant / tunnel.md
Created Jun 22, 2016 — forked from gdamjan/README.md
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all.The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.
View tunnel.md

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

@thekeenant
thekeenant / Paginator.java
Last active Apr 2, 2016
Paginate a list.
View Paginator.java
package net.avicus.atlas.util;
import java.util.ArrayList;
import java.util.List;
/**
* Pagintes a list of items.
* @param <T>
*/
public class Paginator<T> {
@thekeenant
thekeenant / Sidebar.java
Last active Aug 25, 2019
A simple Bukkit scoreboard sidebar API.
View Sidebar.java
package net.avicus.atlas.util;
import com.google.common.base.Preconditions;
import com.google.common.base.Splitter;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
import lombok.Data;
import lombok.Getter;
import lombok.ToString;
You can’t perform that action at this time.