Skip to content

Instantly share code, notes, and snippets.

View jpbochi's full-sized avatar
🦔

JP Bochi jpbochi

🦔
View GitHub Profile
@jpbochi
jpbochi / .bash_ps1
Created August 6, 2019 10:33
bash PROMPT_COMMAND + PS1 for git status
#!/usr/bin/env bash
# copied from http://mediadoneright.com/content/ultimate-git-ps1-bash-prompt
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# TODO: scope the following env vars to this file only. They can be seen with `declare -p`
# Reset
Color_Off="\[\033[0m\]" # Text Reset

plausible general principles governing valid agreements:

  1. Valid consent requires a reasonable way of opting out.
  2. Explicit dissent has precedence over alleged implicit consent.
  3. An action can be taken as indicating agreement to some scheme only if one can be assumed to believe that if one did not take that action the scheme would not be imposed on the person.
  4. Contractual obligation is mutual and conditional.

How does the relation between individuals and the state holds up against those principles?

  1. No state has provided meaningful ways of opting out, means that do not require dissenters to assume large costs that the state has no independent right to impose.
  2. All modern states in refusing to recognize explicit dissent render their relationships with the citizens non-voluntary.
@jpbochi
jpbochi / simple-git-branching-model.md
Created February 10, 2021 09:59 — forked from jbenet/simple-git-branching-model.md
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

import chalk from 'chalk';
import isUnicodeSupported from 'is-unicode-supported';
const main = {
info: chalk.blue('ℹ'),
success: chalk.green('✔'),
warning: chalk.yellow('⚠'),
error: chalk.red('✖'),
};
@reduardo7
reduardo7 / output_prefix.sh
Last active August 19, 2024 12:12
Output prefix with timestamp
#!/usr/bin/env bash
{
echo foo 1
sleep 1
echo bar 1 >&2
echo foo 2
sleep 1
echo bar 2 >&2
} \