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
/mnt/backup: | |
mount.mounted: | |
- device: 10.1.52.20:/mnt/ZFS-P1/VZ-Backups/ | |
- fstype: nfs | |
- mkmnt: True | |
- persist: True | |
- opts: | |
- rw | |
- auto | |
- noatime |
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 | |
# Hostname | |
echo "Hostname: " | |
read hostname | |
hostname $hostname | |
sed -ri "s#^HOSTNAME=.*#HOSTNAME=$hostname#" /etc/sysconfig/network | |
# IPs | |
echo "eth0 IP: " |
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
addnode: | |
cmd.run: | |
- name: "php /usr/local/solusvm/scripts/addnode.php --type={{ pillar['nodetype'] }} --name={{ pillar['nodename'] }} --ip={{ pillar['nodeip'] }} --port={{ pillar['nodeport'] }} --id={{ pillar['nodeid'] }} --key={{ pillar['nodekey'] }}" |
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
salt-call event.fire_master '{"nodename": "TEST", "nodetype": "openvz", "nodeip": "1.1.1.1", "nodeport": "495", "nodeid": "GH5739CHE9VVBEJXBCBE", "nodekey": "GHDDJR7463GCKSBCBEUWDB"}' 'solusvm/addnode' |
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 salt | |
import socket | |
import os | |
import platform | |
import math | |
from salt.modules.network import ip_addrs | |
from psutil import virtual_memory | |
# Config | |
solusvm_config_path = "/usr/local/solusvm/data/solusvm.conf" |
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
// Configure input fields | |
$scope.input = { | |
subjectType: { | |
name: 'subjectType', | |
label: 'Type', | |
}, | |
subjectId: { | |
name: 'subjectId', | |
label: 'With ID', | |
}, |
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
.MToolControl.stretch { | |
visibility: hidden; | |
} |
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
The operation couldn’t be completed. (kCFStreamErrorDomainSSL error -9806.) |
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 | |
function log_output { | |
logger -p daemon.warning $1 | |
echo $1 | |
} | |
function truncate_start { | |
FILE_PATH="$1" | |
SAVE_LINES=$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
F = new int[n][w]; | |
// Initialize first row and first column to zero | |
for(int i = 0; i<n; i++) | |
{ | |
F[i][0] = 0; | |
} | |
for(int i = 0; i<w; i++) | |
{ | |
F[0][i] = 0; |
OlderNewer