Skip to content

Instantly share code, notes, and snippets.

View augustoroman's full-sized avatar

Augusto Roman augustoroman

View GitHub Profile
@augustoroman
augustoroman / ._preview.png
Last active January 2, 2023 18:49
zsh / powerlevel10k config
._preview.png
@augustoroman
augustoroman / git-go-pseudoversion
Created April 26, 2021 17:53
git-go-pseudoversion: print the go pseudoversion for any git repo
#!/bin/bash -e
TZ=UTC git --no-pager show \
--quiet \
--abbrev=12 \
--date='format-local:%Y%m%d%H%M%S' \
--format="%cd-%h"
@augustoroman
augustoroman / .bash_profile
Created March 16, 2018 21:59
switch mac and win kb layout
alias winkb='hidutil property --set '"'"'{"UserKeyMapping":[
{"HIDKeyboardModifierMappingSrc":0x7000000e2, "HIDKeyboardModifierMappingDst":0x7000000e3},
{"HIDKeyboardModifierMappingSrc":0x7000000e3, "HIDKeyboardModifierMappingDst":0x7000000e2},
{"HIDKeyboardModifierMappingSrc":0x7000000e4, "HIDKeyboardModifierMappingDst":0x7000000e6},
{"HIDKeyboardModifierMappingSrc":0x7000000e6, "HIDKeyboardModifierMappingDst":0x7000000e7}
]}'"'"''
alias mackb='hidutil property --set '"'"'{"UserKeyMapping":[]}'"'"''
@augustoroman
augustoroman / example.c
Last active June 2, 2018 23:48
Example use of nacl secretbox in C, C++, Go
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "crypto_secretbox.h"
#include "randombytes.h"
// install nacl: https://nacl.cr.yp.to/install.html
// export NACL_DIR=path/to/nacl/build/<machinename>/
@augustoroman
augustoroman / .bash_profile
Last active January 24, 2019 02:42
aroman's new computer setup (.bash_profile w/ colors, sublime plugins, etc)
# This is for OSX
tput colors > /dev/null
if [ "$?" == "0" ]; then
color_prompt="yes"
fi
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
@augustoroman
augustoroman / keybase.md
Created September 23, 2016 09:37
keybase.md

Keybase proof

I hereby claim:

  • I am augustoroman on github.
  • I am augusto (https://keybase.io/augusto) on keybase.
  • I have a public key ASBLbgKIxWOvrsYkY8_8OWI1SQ6p8Vdp4mdM1vKQsbkOego

To claim this, I am signing this object:

@augustoroman
augustoroman / colors.sh
Last active February 21, 2019 03:46
Bash color codes
#!/bin/bash
# Inspired by http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
# References:
# http://misc.flogisoft.com/bash/tip_colors_and_formatting
# http://ascii-table.com/ansi-escape-sequences.php
T='gYw' # The test text
@augustoroman
augustoroman / cmd_signal_test.go
Created December 2, 2013 08:49
gobs/cmd does not play well with signal handling. TestSignal works, but TestSignalInCmd fails almost every time.
package cmd_signal_test
import (
"github.com/gobs/cmd"
"os"
"os/signal"
"testing"
"time"
)