Skip to content

Instantly share code, notes, and snippets.

@kalistace
kalistace / LRUCache
Created June 20, 2019 15:39 — forked from krishankant/LRUCache
LRUCache Implementation
package com.learning;
/* package whatever; // don't place package name! */
import java.util.HashMap;
class Entry {
int value;
int key;
Entry left;
Entry right;
@kalistace
kalistace / restart_bluetooth.sh
Created January 14, 2019 17:53 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@kalistace
kalistace / di-in-fp.md
Created January 7, 2019 16:28 — forked from gvolpe/di-in-fp.md
Dependency Injection in Functional Programming

Dependency Injection in Functional Programming

There exist several DI frameworks / libraries in the Scala ecosystem. But the more functional code you write the more you'll realize there's no need to use any of them.

A few of the most claimed benefits are the following:

  • Dependency Injection.
  • Life cycle management.
  • Dependency graph rewriting.
@kalistace
kalistace / mvncolor.sh
Last active August 29, 2015 14:12 — forked from dant3/mvncolor.sh
#!/usr/bin/env bash
# Formatting constants
BOLD=`tput bold`
UNDERLINE_ON=`tput smul`
UNDERLINE_OFF=`tput rmul`
TEXT_BLACK=`tput setaf 0`
TEXT_RED=`tput setaf 1`
TEXT_GREEN=`tput setaf 2`
TEXT_YELLOW=`tput setaf 3`