Skip to content

Instantly share code, notes, and snippets.

@dinolupo
dinolupo / Docker_frequent_ commands.md
Last active August 29, 2015 14:21
Docker frequent commands

Docker frequent commands

running a container

docker run -d -P  training/webapp python app.py
-d //is for background
-P // map any port inside container to the our host
docker ps -l  // details of last container

docker ps -a // details of all containers (also stopped ones)

@dinolupo
dinolupo / .vimrc
Last active September 26, 2018 19:11
VIMRC
syntax on
:colorscheme darkblue
:set tabstop=4
:set shiftwidth=4
":set expandtab
" Clear last search highlighting
nnoremap <Space> :noh<cr>
" If arrows key not working do the following
@dinolupo
dinolupo / .bashrc
Created May 16, 2015 18:09
.BASHRC improved command prompt for OSX, CENTOS, UBUNTU, etc,
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@dinolupo
dinolupo / .dircolors
Created May 16, 2015 18:11
.DIRCOLORS I really do not like those blue folders on Linux
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# Below, there should be one TERM entry for each termtype that is colorizable
TERM Eterm
TERM ansi

Notes from the distributed matters 2015 conference.

Jepsen V (Kyle Kingsbury)

Talks about how Jepsen works and what systems have been tested until now, among others:

  • Riak: default is last-write-wins, but you should not be using it
  • ZK: works as advertised (!)

... But all of this is also on his blog, not anything really new.

@dinolupo
dinolupo / gist:d2a717bbf31875006769
Last active October 22, 2015 09:07 — forked from saetia/gist:1623487
SAETIA - Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@dinolupo
dinolupo / .zshrc
Created October 22, 2015 09:04
zshrc for my clean OS X ElCapitan installation
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="kphoen"
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # end mode
export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
export LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box
export LESS_TERMCAP_ue=$'\E[0m' # end underline
@dinolupo
dinolupo / osx-elcapitan-settings.markdown
Last active June 10, 2016 04:37
OS X El Capitan Clean install

OS X Preferences


most of these require logout/restart to take effect

# Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 25

# Set a blazingly fast keyboard repeat rate
@dinolupo
dinolupo / low-power-blink.ino
Last active November 3, 2015 11:56
Low Power Blinking Led with Arduino and AT Tiny 85 processor
@dinolupo
dinolupo / mongo-commands.md
Last active November 13, 2015 14:59
Mongo Commands

Exporting a mongo query result to file "products.json"

mongo --quiet databaseName --eval "var c = db.products.find(); while(c.hasNext()) {printjson(c.next())}" > products.json

OR

create a Javascript file like the following:

vim query.js