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)

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 / .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 / 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 / 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

@dinolupo
dinolupo / esp8266.md
Last active January 30, 2016 17:19
ESP8266 AT Commands

ESP8266 AT Commands

AT+CWMODE=1
AT+CWQAP
AT+CWLAP
AT+CWJAP="ssid","password"
AT+CIFSR
@dinolupo
dinolupo / OneDarkXcode.dvtcolortheme
Created May 11, 2016 11:40
Xcode Color and Font settings (Dark and Relaxing) using Adobe Source Code Pro Font
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.65098 0.698039 0.752941 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.65098 0.698039 0.752941 1</string>
@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 / Open iTerm2 at Finder Location.app
Created June 30, 2016 12:43
AppleScript that opens a new iTerm2 at a file or directory selected location in Finder
on run {input, parameters}
tell application "Finder"
set dir_path to quoted form of (POSIX path of (folder of the front window as alias))
end tell
CD_to(dir_path)
end run
on CD_to(theDir)
tell application "iTerm"
set _term to create window with default profile