This file contains hidden or 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
# Usage | |
# | |
# To build: | |
# $ docker build --build-arg SWIG_VERSION=3.0.10 -t swig . | |
# | |
# To run: | |
# host$ docker run --rm -it -v $(pwd):/src swig | |
# cont$ swig ... | |
# | |
# For SWIG 4.x use bullseye, for 3.x use buster |
This file contains hidden or 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
__kube_ps1() | |
{ | |
# Get current context | |
CONTEXT="$(kubectl config current-context)" | |
if [ -n "$CONTEXT" ]; then | |
NAMESPACE="$(kubectl config view -o=jsonpath="{.contexts[?(@.name==\"${CONTEXT}\")].context.namespace}")" | |
echo "⎈ $CONTEXT:${NAMESPACE:-default}" | |
fi | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
""" | |
Server-side ORM cursors with PostgreSQL and Django 1.8 | |
Typically Postgres cursors fetch all results regardless of any Python-side iteration | |
This will fetch chunks of rows at a time from the database using a server-side cursor, | |
and yield them usefully for iteration. | |
Usage: | |
>>> queryset = MyModel.objects.all() |
This file contains hidden or 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
[Core] | |
Name = StandupFlows | |
Module = standup_flows.py | |
[Documentation] | |
Description = Standup Flows | |
[Python] | |
version = 3 |
This file contains hidden or 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
Mon Jan 23 12:34:41 UTC 2017 |
This file contains hidden or 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
[gammu] | |
port = /dev/tty.HUAWEIMobile-Modem | |
connection = at19200 | |
model = at | |
synchronizetime = yes | |
logfile = /Users/me/.gammu/log | |
logformat = errorsdate | |
gammucoding = utf8 | |
[smsd] |
This file contains hidden or 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
#!/bin/bash | |
# "docker run" with SSH Agent Forwarding for boot2docker | |
# QuickStart: | |
# 1. Download to ~/bin/docker-run-ssh and chmod +x it | |
# 2. docker-run-ssh [normal args to docker run...] | |
# Use a unique ssh socket name per-invocation of this script | |
SSH_SOCK=boot2docker.$$.ssh.socket |
This file contains hidden or 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
# Default pivot location | |
lxc.pivotdir = lxc_putold | |
# Default mount entries | |
lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0 | |
lxc.mount.entry = sysfs sys sysfs defaults 0 0 | |
# Default console settings | |
#lxc.devttydir = lxc | |
lxc.tty = 4 |
This file contains hidden or 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
#!/usr/bin/env python | |
import os, signal | |
print "About to pause myself, do 'fg' to resume" | |
os.kill(os.getpid(), signal.SIGTSTP) | |
print "Resumed!" |