This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S node | |
// this can be used as a prepare-commit-msg | |
// Add it to your project source code in githooks/prepare-commit-msg | |
// `git config --local core.hooksPath githooks/` | |
const fs = require('fs'); | |
const path = require('path'); | |
const { execSync } = require('child_process'); | |
const { argv, exit } = require('process'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# based on https://gist.github.com/bashbunni/3880e4194e3f800c4c494de286ebc1d7?permalink_comment_id=4445592#gistcomment-4445592 | |
# Requires https://github.com/caarlos0/timer to be installed. | |
# Requires lolcat (should be a simple apt/yum install) | |
# spd-say should ship with your distro | |
declare -A pomo_options | |
pomo_options["work"]="25" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Collections; | |
import java.util.List; | |
import java.util.Optional; | |
import java.util.stream.Collectors; | |
public class Scratch { | |
public static void main(String[] args) { | |
Optional<Schmoochies> schmoochies = Optional.of(new Schmoochies()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var YourObject = function () { | |
// ensure YourCobject was called as a constructor | |
if (!(this instanceof YourObject)) { | |
return new YourObject(); | |
} | |
// do your thing now, it's safe!! | |
}; |