start new:
tmux
start new with session name:
tmux new -s myname
unbind C-b | |
set -g prefix C-z | |
bind-key C-a send-prefix | |
# split panes using | and - | |
bind | split-window -h -c "#{pane_current_path}" | |
bind - split-window -v -c "#{pane_current_path}" | |
bind c new-window -c "#{pane_current_path}" | |
unbind '"' | |
unbind % |
Questions are not from any actual exam!!! | |
Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl | |
and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] | |
Once the job has completed, check the logs to and export the result to pi-result.txt. | |
Solution: |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
kubectl get services # List all services | |
kubectl get pods # List all pods | |
kubectl get nodes -w # Watch nodes continuously | |
kubectl version # Get version information | |
kubectl cluster-info # Get cluster information | |
kubectl config view # Get the configuration | |
kubectl describe node <node> # Output information about a node | |
kubectl get pods # List the current pods | |
kubectl describe pod <name> # Describe pod <name> | |
kubectl get rc # List the replication controllers |
print("UPDATE AUG 2023: this script is beyond old and broken") | |
print("You may find interesting and more up to date resources in the comments of the gist") | |
exit() | |
from slacker import Slacker | |
import json | |
import argparse | |
import os | |
# This script finds all channels, private channels and direct messages |
# Our .tmux.conf file | |
# Setting the prefix from C-b to C-s | |
set -g prefix C-s | |
# enable vi keys. | |
setw -g mode-keys vi | |
# Free the original Ctrl-b prefix keybinding | |
unbind C-b | |
#setting the delay between prefix and command | |
set -sg escape-time 1 |
// ==UserScript== | |
// @name Feedly Tweak - Open feed item in background by pressing 'v' | |
// @namespace http://micbase.com/feedly-tweak-open-item-background-tab-firefox | |
// @description Feedly Tweak - Open feed item in background by pressing 'v' | |
// @include http*://feedly.com/* | |
// @grant GM_openInTab | |
// ==/UserScript== | |
var x; | |
var link; |
#!/usr/bin/env python | |
from pocket import Pocket | |
import webbrowser, sys | |
# Get consumer key from cmd line | |
consumer_key = sys.argv[1] | |
request_token = Pocket.get_request_token( | |
consumer_key=consumer_key, |