As configured in my dotfiles.
start new:
tmux
start new with session name:
## Before restart | |
mkdir /opt/data/ramdisk_backup | |
rsync -av /mnt/dss/ramdisk/scocache /opt/data/ramdisk_backup | |
rsync -av /mnt/dss/ramdisk/tlogs /opt/data/ramdisk_backup | |
## Reboot | |
reboot | |
## After restart | |
rsync -av /opt/data/ramdisk_backup/scocache /mnt/dss/ramdisk |
==== IAAS / Q5 ==== | |
ca = i.config.cloudApiConnection.find('main') | |
volid = 'c0a12a612e5946ea' | |
ca.disk.find(id = volid) | |
volguid = ca.disk.find(id = volid)['result'][0] | |
volguid | |
ca.disk.getObject(volguid) |
import os | |
scsi = os.popen('lsscsi').read().rstrip().split('\n') | |
for l in [s.split() for s in scsi]: | |
print l[0], l[-1] | |
# csv | |
import csv | |
file_csv = '' | |
csvfile = open(file_csv, 'rb') | |
reader = csv.reader(csvfile) | |
for row in reader: | |
print row | |
import csv |
As configured in my dotfiles.
start new:
tmux
start new with session name:
[root@vm-2-100 ~]# cat /etc/ipsec.conf
# /etc/ipsec.conf - Openswan IPsec configuration file
#
# Manual: ipsec.conf.5
#
# Please place your own config files in /etc/ipsec.d/ ending in .conf
version 2.0 # conforms to second version of ipsec.conf specification
## sed fichier /etc/hosts | |
sed -n '/HostsBegin/,/HostsEnd/p' /etc/hosts|\ | |
egrep -v '^[[:space:]]*$|^#' |\ | |
while read ipaddr hn x; do | |
if ! ping -c 2 -W 2 $ipaddr >/dev/null 2>&1; then | |
echo $ipaddr $hn unreachable | |
fi | |
done |
#!/usr/bin/python | |
# -*- encoding: utf-8; py-indent-offset: 4 -*- | |
# vim: :set ts=8 et sw=4 sts=4 | |
import glob, sys | |
def CleanTmpDir(): | |
folder = '/tmp' | |
import os | |
for the_file in os.listdir(folder): |
sudo dnf install gcc libvirt libvirt-devel libxml2-devel make ruby-devel | |
CONFIGURE_ARGS="with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib64" vagrant plugin install vagrant-libvirt | |
CONFIGURE_ARGS="with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib64" vagrant plugin install vagrant-mutate |
Task 1: Create a project jumphost instance | |
Navigation menu > Compute engine > VM Instance | |
Task 2: Create a Kubernetes service cluster | |
gcloud config set compute/zone us-east1-b | |
gcloud container clusters create nucleus-webserver1 |