Skip to content

Instantly share code, notes, and snippets.

@jonjitsu
jonjitsu / docker-compose.yml
Created January 18, 2024 14:29
run gitlab locally
version: '3.7'
services:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'localhost'
container_name: gitlab-ce
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://localhost'
# -*- mode: sh -*-
alias gs='git status '
alias gsp='git status --porcelain'
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias gk='gitk --all&'
alias gx='gitx --all'
@jonjitsu
jonjitsu / _colors
Created November 3, 2023 14:39
bash color codes
# -*- mode: sh -*-
colors.show-ansi() {
# If you would like to customize your colors, use
# DEV: 30-39 lines up 0-9 from `tput`
for i in $(seq 0 109); do
echo -n -e "\033[1;${i}mText$(tput sgr0) "
echo -n "\033[1;${i}m"
done
}
@jonjitsu
jonjitsu / prompt.bash
Created November 3, 2023 14:32
Bash prompt
PROMPT_BOLD="$COLOR_BOLD"
USER_COLOR="$COLOR_BOLD_BLUE"
PREPOSITION_COLOR="$COLOR_BOLD_WHITE"
DEVICE_COLOR="$COLOR_BOLD_CYAN"
DIR_COLOR="$COLOR_BOLD_GREEN"
COLOR_YELLOW="$COLOR_BOLD_YELLOW"
GIT_PROGRESS_COLOR="$COLOR_BOLD_RED"
SYMBOL_COLOR="$PROMPT_BOLD" # BOLD
@jonjitsu
jonjitsu / .tmux.conf
Created November 3, 2023 14:07
.tmux.conf
#
# Works with:
# tmux-2.3
#
unbind-key -a
unbind C-b
set -g prefix C-j
set -g default-terminal "xterm-256color"
# Set status bar
@jonjitsu
jonjitsu / t.ts
Created September 5, 2019 14:58
typescript 1
type Item = {
Foo: string,
Bar: string,
// ...
}
function validate(item: Item): string[] {
const required = ['Foo', ... ]
return required.reduce((errors: string[], field) => {
if (item[field] == null) errors.push(`${field} is required`)

Keybase proof

I hereby claim:

  • I am jonjitsu on github.
  • I am jonjitsu (https://keybase.io/jonjitsu) on keybase.
  • I have a public key ASACbKk3g2jA-CIQvuOjFX_MR8-9EtEpA3nAZJfy3NXJIgo

To claim this, I am signing this object: