Skip to content

Instantly share code, notes, and snippets.

@pslobo
pslobo / .tmux.conf
Created May 30, 2017 13:18 — forked from BretFisher/.tmux.conf
My ugly tmux config, much copied from others and tweaked
# 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'
@pslobo
pslobo / docker-cli-tips-and-tricks.md
Created September 9, 2016 09:12 — forked from BretFisher/docker-cli-tips-and-tricks.md
Docker CLI Tips and Tricks
@pslobo
pslobo / swarm.sh
Created July 25, 2016 10:42 — forked from etoews/swarm.sh
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 \
@pslobo
pslobo / gist:24443fa7fe36ff26a103
Created October 22, 2015 13:54 — forked from saetia/gist:1623487
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
@pslobo
pslobo / RPMpackages.rb
Last active September 3, 2015 14:43 — forked from KartikTalwar/RPMpackages.rb
Create puppet facts for RPM packages
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
@pslobo
pslobo / GoToMailbox.scpt
Created June 7, 2015 10:19
Jump to Specific Mailbox in Mail.app
try
tell application "Mail"
activate
set selected mailboxes of message viewer 1 to {mailbox "App Testing" of account "iCloud"}
end tell
on error errmsg
return errmsg
end try
@pslobo
pslobo / Move_Messages.scpt
Created June 6, 2015 11:56
Let's Talk Tech How To
try
tell application "Mail"
set msgs to selection
if length of msgs is not 0 then
repeat with msg in msgs
try
move msg to mailbox "App Testing" of account "iCloud"
on error errmsg
return errmsg
end try
from xml.etree.ElementTree import Element, SubElement, tostring
from os import path
from Foundation import (
CFPreferencesAppSynchronize,
CFPreferencesCopyAppValue,
CFPreferencesCopyKeyList,
CFPreferencesSetValue,
kCFPreferencesAnyUser,
kCFPreferencesCurrentHost
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
import feedparser
import time
import datetime
from dateutil import tz
import re
import httplib
import urllib
DROPBOX_PERSONAL_FEED = ''
DROPBOX_WORK_FEED = ''