Setup port forwarding connection from a server that does not have access to the git_server
but does have access to the proxy_server
.
#ssh -L <local_port>:git_server:<git_port> proxy_server
$ ssh -L 3333:mygitserver.com:7999 myproxyserver
<%= @name %> # variable visible in current scope | |
<%= scope.lookupvar('name') %> # search in all scopes | |
<%= scope['somewhere::name'] %> # Puppet 3 scope access |
erb -x -T '-' <template> | ruby -c |
curl -u <user> --upload-file atlassian-bamboo-5.15.3.tar.gz http://<nexus-host>/content/repositories/releases/atlassian/atlassian-bamboo/5/15/3/atlassian-bamboo-5.15.3.tar.gz |
# Find path | |
less <tar-file> | |
# File in stdout | |
tar xfO <tat-file> <path-to-file> |
import sys | |
sys.path.append('/path/to/module-dir') |
sudo /opt/pbis/bin/update-dns --ipaddress <ip> |
# Migrations | |
## Purge DB and start fresh | |
``` | |
$ rm db.sqlite3 | |
$ python manage.py migrate --noinput | |
``` |
import os | |
import errno | |
try: | |
# do something | |
except OSError, e: | |
if e.errno == errno.EACCES: | |
log.error('Must run as privileged user') | |
else: | |
raise |