Skip to content

Instantly share code, notes, and snippets.

pslobo pslobo

Block or report user

Report or block pslobo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@BretFisher
BretFisher / .tmux.conf
Created Feb 25, 2017
My ugly tmux config, much copied from others and tweaked
View .tmux.conf
# 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'
@BretFisher
BretFisher / docker-for-mac.md
Last active Sep 12, 2019
Getting a Shell in the Docker for Mac Moby VM
View docker-for-mac.md

2018 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Moby VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


View docker-cli-tips-and-tricks.md
View 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 \
View htmltable_to_table.py
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
@samisalkosuo
samisalkosuo / Deploy_Oracle.sh
Last active Jul 25, 2019
Oracle 12c silent installation files, including response files. Start installation executing Deploy_Oracle.sh. See also here: http://sami.salkosuo.net/silent-service/.
View Deploy_Oracle.sh
#!/bin/sh
#Set up Linux and oracle
echo "Deploying Oracle..."
if [[ "$1" != "" ]] ; then
DEFAULT_PWD=$1
echo "Using user specified default password"
else
DEFAULT_PWD=passW0RD
@waltonjones
waltonjones / ST_QuickCursor
Created Dec 3, 2014
Shell script for use in Keyboard Maestro macro to mimic "QuickCursor" with Sublime Text
View ST_QuickCursor
export __CF_USER_TEXT_ENCODING=0x1F5:0x8000100:0x8000100
TMPFILE=`mktemp /tmp/XXXXXX`
/usr/bin/pbpaste > $TMPFILE
echo $TMPFILE
~/bin/subl -w $TMPFILE:10000000:10000000
View ZoomView.py
import ui
class Touch(object):
''' writable version of ui.Touch'''
def __init__(self,touch):
self.location=touch.location
self.touch_id=touch.touch_id
self.phase=touch.phase
self.prev_location=touch.prev_location
self.timestamp=touch.timestamp
View gist:48c322266ca4fd0ec8bf
// Drafts 4 script step to create custom tags
// using the a line or a default value if that line is empty or missing
// split draft into an array of lines
var lines = draft.content.split('\n');
// reusable function to define tag based on line or default string
function createLineTag(lineNumber,default) {
var tagName = "line"+(lineNumber+1).toString();
if(lines[lineNumber] && lines[lineNumber].length > 0) {
View dropbox_events.py
import feedparser
import time
import datetime
from dateutil import tz
import re
import httplib
import urllib
DROPBOX_PERSONAL_FEED = ''
DROPBOX_WORK_FEED = ''
You can’t perform that action at this time.