Skip to content

Instantly share code, notes, and snippets.

View thekeenant's full-sized avatar

Keenan thekeenant

View GitHub Profile

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 23:02
An implementation of ScheduledExecutorService for LibGDX which executes tasks on the main game thread.
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;
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;
Loading
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 August 20, 2023 15:53
Approximate the derivative of a function in 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 December 26, 2023 17:51 — 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.

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 December 26, 2023 17:50
My CS bookmarks.

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 June 22, 2016 20:10 — 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.

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 April 2, 2016 04:47
Paginate a list.
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 August 25, 2019 00:48
A simple Bukkit scoreboard sidebar API.
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;