This file contains 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
# /etc/dnsmasq.d/2nd_dns | |
server=/.localdomain/192.168.0.2 |
This file contains 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
import paramiko | |
c = paramiko.client.SSHClient() | |
c.load_system_host_keys() | |
c.set_missing_host_key_policy(paramiko.client.AutoAddPolicy()) | |
c.connect('192.168.0.1', username='ubuntu', password='password', | |
sock=paramiko.ProxyCommand('ssh -W 192.168.0.1:22 -w 120 10.0.0.1')) | |
_in, _out, _err = c.exec_command('ls -la') | |
print _out.read() |
This file contains 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
import subprocess | |
p = subprocess.Popen( | |
['ls', '-l'], | |
cwd='/tmp', | |
stderr=subprocess.PIPE, | |
stdout=subprocess.PIPE, | |
stdin=subprocess.PIPE) | |
p.wait() |
This file contains 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 | |
sudo pvcreate /dev/sdb1 | |
sudo vgextend ubuntu-vg /dev/sdb1 | |
sudo lvextend /dev/ubuntu-vg/root -l +100%FREE | |
# sudo lvextend /dev/ubuntu-vg/root -L+50G | |
sudo resize2fs /dev/ubuntu-vg/root # only for ext2,3,4 | |
#sudo resize2fs /dev/ubuntu-vg/root 50G |
This file contains 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
uwsgi --wsgi-file app.py --http 0.0.0.0:8080 |
This file contains 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
RemoteDisplay.vnc.enabled = TRUE | |
RemoteDisplay.vnc.port = 5900 | |
RemoteDisplay.vnc.password = password | |
RemoteDisplay.vnc.keyMap = jp |
This file contains 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
jenkins.model.Jenkins.instance.securityRealm.createAccount("user-name", "password"); |
This file contains 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
curl https://pypi.python.org/pypi/pip/json | jq '.releases | keys[]' -r |
This file contains 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
import json | |
import sys | |
from oslo_config import cfg | |
import oslo_i18n | |
from neutron.agent import rpc | |
from neutron.common import config | |
from neutron.common import rpc as n_rpc | |
from neutron.common import topics |
This file contains 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/sh | |
# chkconfig: 2345 99 01 | |
# description: SoftEther VPN Server | |
DAEMON=/usr/local/vpnbridge/vpnbridge | |
LOCK=/var/lock/subsys/vpnbridge | |
test -x $DAEMON || exit 0 | |
case "$1" in | |
start) | |
$DAEMON start | |
touch $LOCK |