Skip to content

Instantly share code, notes, and snippets.

View fuzzylimes's full-sized avatar

Zach Cochran fuzzylimes

View GitHub Profile
@Miigon
Miigon / my_pmset_configuration.sh
Created January 27, 2020 21:40
My pmset configuration on my MacBook Pro 13'' Early 2015
#!/bin/bash
# macOS power management settings optimized for longer battery life
# Tested on MacBook Pro 13'' Early 2015
# Miigon 2020-01-28
echo " "
echo "######################## DISCLAIMER ########################"
echo "Although this script can be run, it's more intended to show"
@timneutkens
timneutkens / index.js
Last active March 4, 2024 14:01
Clear console/terminal in node.js the right way
const readline = require('readline')
const blank = '\n'.repeat(process.stdout.rows)
console.log(blank)
readline.cursorTo(process.stdout, 0, 0)
readline.clearScreenDown(process.stdout)
@jewelsea
jewelsea / H2Tasks.java
Last active March 5, 2024 22:24
Sample for accessing a local database from JavaFX using concurrent tasks for database operations so that the UI remains responsive.
package h2app;
import javafx.application.Application;
import javafx.collections.*;
import javafx.concurrent.Task;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.Stage;