(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
require 'cgi' | |
require 'digest/md5' | |
require 'net/https' | |
require 'uri' | |
module Jekyll | |
class GistTag < Liquid::Tag | |
def initialize(tag_name, text, token) | |
super | |
@text = text |
MARATHON_URL=http://xxx.xxx.xxx.xxx:8080 | |
curl -X POST ${MARATHON_URL}/v2/apps -d @sample_marathon_task.json -H "Content-type: application/json" |
brooklyn.catalog: | |
version: 0.9.0-SNAPSHOT # BROOKLYN_VERSION | |
items: | |
# load everything in the classpath with a @Catalog annotation | |
- scanJavaAnnotations: true | |
- id: server | |
description: | | |
Provision a server, with customizable provisioning.properties and credentials installed, |
#!/bin/sh | |
# Filename: /etc/dhcp/dhclient-exit-hooks.d/sethostname | |
# Purpose: Used by dhclient-script to set the hostname of the system | |
# to match the DNS information for the host as provided by | |
# DHCP. | |
# logs in /var/log/syslog | |
# | |
echo dhclient-exit-hooks.d/sethostname: reason = $reason, interface = $interface |
#!/bin/sh | |
echo "Running dhclient change hostname script for Ubuntu. reason=${reason}" | |
timestamp=$(date +%s) | |
if grep localhost /etc/hostname; then | |
echo "Current hostname:" | |
cat /etc/hostname | |
echo "Attempting to configure hostname" | |
if [ "x$reason" = "xBOUND" ]; then | |
hostname=$new_host_name |
"brooklyn-jetty-server-8443-qtp878715618-32" prio=10 tid=0x00007f7ecd87d000 nid=0x7371 waiting on condition [0x00007f7eba19a000] | |
java.lang.Thread.State: WAITING (parking) | |
at sun.misc.Unsafe.park(Native Method) | |
- parking to wait for <0x00000007be966a90> (a java.util.concurrent.FutureTask) | |
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) | |
at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:425) | |
at java.util.concurrent.FutureTask.get(FutureTask.java:187) | |
at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63) | |
at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:361) | |
at org.apache.brooklyn.util.time.Durations.get(Durations.java:43) |
hello |
# via https://coderwall.com/p/_s_xda/fix-ssh-agent-in-reattached-tmux-session-shells | |
fixssh() { | |
for key in SSH_AUTH_SOCK SSH_CONNECTION SSH_CLIENT; do | |
if (tmux show-environment | grep "^${key}" > /dev/null); then | |
value=`tmux show-environment | grep "^${key}" | sed -e "s/^[A-Z_]*=//"` | |
export ${key}="${value}" | |
fi | |
done | |
} |
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb