- Bash/zsh completion
- use Tab to populate command line, narrows down options as you go, fills in container names, ID's, images, volumes. Huge time saver.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tmux config for ultimate winning | |
# make tmux display things in 256 colors | |
#set -g default-terminal "screen-256color" | |
# use this if italic enabled in term profile | |
set -g default-terminal "tmux-256color" | |
# set just true color without custom term | |
#set -ga terminal-overrides ",xterm-256color:Tc" | |
# fixes bug: https://github.com/tmux/tmux/issues/435 | |
#set -ga terminal-overrides ',xterm*:sitm=\E[3m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-machine create -d virtualbox swarm-keystore | |
eval "$(docker-machine env swarm-keystore)" | |
docker run -d \ | |
-p "8500:8500" \ | |
-h "consul" \ | |
progrium/consul -server -bootstrap | |
docker-machine create \ | |
-d virtualbox \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package_data = Facter::Util::Resolution.exec('rpm --query --all --qf "%{NAME}||%{VERSION}\n"') | |
package_data.split("\n").each do |line| | |
rpm_detail = line.split("||") | |
package_name = 'package_' + rpm_detail[0] | |
package_version = rpm_detail[1] | |
Facter.add(package_name) do | |
setcode do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xml.etree.ElementTree import Element, SubElement, tostring | |
from os import path | |
from Foundation import ( | |
CFPreferencesAppSynchronize, | |
CFPreferencesCopyAppValue, | |
CFPreferencesCopyKeyList, | |
CFPreferencesSetValue, | |
kCFPreferencesAnyUser, | |
kCFPreferencesCurrentHost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from BeautifulSoup import BeautifulSoup as Soup | |
import urllib | |
raw_page = urllib.urlopen('http://www.sfrandonneurs.org/home.htm') | |
soup = Soup(raw_page) | |
class MarkdownTable: | |
@staticmethod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import feedparser | |
import time | |
import datetime | |
from dateutil import tz | |
import re | |
import httplib | |
import urllib | |
DROPBOX_PERSONAL_FEED = '' | |
DROPBOX_WORK_FEED = '' |
Dispatch registers the x-dispatch://
URL scheme and provides one public action: compose
.
Launches Dispatch with the composer screen prefilled using information provided in the parameters below.
Optional. Specifies the email address of the account to compose the new mail from. If there are more than one account configured in Dispatch, and no valid from
account is provided, Dispatch will default to using the first account configured in Dispatch to compose the mail.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# views.py | |
# Aleksandr Pasechnik | |
# | |
# A Django views.py function which bridges Piwik and StatusBoard | |
# | |
# Django: https://www.djangoproject.com | |
# Piwik: http://piwik.org | |
# StatusBoard: http://panic.com/statusboard/ | |
# PiwikAPI: https://github.com/piwik/piwik-python-api | |
# |
NewerOlder