Skip to content

Instantly share code, notes, and snippets.

@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`
@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 / 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 / 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 / immich-backup-restore-clean.sh
Last active August 3, 2025 15:58
Immich Backup Restore Script - Generated
#!/bin/bash
# =============================================================================
# Immich Backup Restore Script
# =============================================================================
#
# PURPOSE:
# Restores an Immich backup from restic repository to a local test environment.
# Handles proper database restoration, file copying, and container management.
#
@kalistace
kalistace / pcloud_sync.sh
Created August 3, 2025 16:11
pCloud sync script using rclone
#!/bin/bash
# Configuration
REMOTE="pcloud:"
LOCAL="$HOME/Documents/pCloudSync/"
LOG_DIR="$HOME/logs"
LOG_FILE="$LOG_DIR/rclone_sync.log"
STATUS_FILE="$LOG_DIR/rclone_status"
# Use FULL path to rclone (change this to your actual path)