Skip to content

Instantly share code, notes, and snippets.

View mrandi's full-sized avatar

Michele Randi mrandi

View GitHub Profile
{
"l0": [
"asdf",
"dfgh"
],
"l1": [
{
"name": "asdfasd",
"env": "prod",
"title": "one"
@mrandi
mrandi / curl-format.txt
Created July 25, 2017 13:42
format to get time info with curl
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
@mrandi
mrandi / gpg.conf
Created September 28, 2016 15:00
~/.gnupg/gpg.conf
cert-digest-algo SHA512
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
keyserver hkps://hkps.pool.sks-keyservers.net
no-emit-version
default-key XXXXXXX
no-tty
use-agent
@mrandi
mrandi / mrandi.zsh-theme
Created April 25, 2016 14:19
custom zsh theme
function prompt_char {
if [ $UID -eq 0 ]; then echo "#"; else echo $; fi
}
PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
@mrandi
mrandi / gpg-agent.conf
Created April 25, 2016 14:17
.gnupg/gpg-agent.conf
pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
enable-ssh-support
write-env-file /Users/xxx/.gnupg/gpg-agent.env
use-standard-socket
default-cache-ttl 600
max-cache-ttl 7200
debug-level basic
log-file /Users/xxx/.gnupg/gpg-agent.log

Keybase proof

I hereby claim:

  • I am mrandi on github.
  • I am mrandi (https://keybase.io/mrandi) on keybase.
  • I have a public key whose fingerprint is C3E0 0688 F24C 1BD5 B780 6EBD 38FF D1E3 980F 4EAC

To claim this, I am signing this object:

#!/usr/bin/env python3
from pprint import pprint
import requests
import json
import os
USER='XXX'
API_TOKEN='XXX'
GIT_API_URL='https://api.github.com'
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[user]
name = xxx xxx
email = xxx@xxx.com
signingkey = xxx
[color]
ui = true
du -ch | grep total
# list all services
sudo netstat --ltp
# find file
find ~/ -type f -name "*.*"
# find dir
find / -type d -name 'dir_name'
@mrandi
mrandi / .bash_profile
Last active April 25, 2016 14:13
Mac command utils
export LC_ALL=en_US.utf-8 export LANG=en_US.utf-8
# ls with color
export CLICOLOR=1
#export LSCOLORS=Exfxcxdxbxegedabagacad
# highlight matches
export GREP_OPTIONS='--color=auto'
#alias