This file contains hidden or 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
class devtools { | |
package { ['git', 'mtr', 'vim', 'zip', 'htop', 'make', 'iotop', 'iperf', 'ngrep', 'strace', 'curl', 'wget' ]: | |
ensure => latest | |
} | |
} |
This file contains hidden or 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 | |
MYUSER="kooluser" | |
MYGROUP="wheel" | |
useradd $MYUSER | |
usermod -G $MYGROUP $MYUSER | |
mkdir -p /home/$MYUSER/.ssh | |
cat ${MYUSER}.pub > /home/$MYUSER/.ssh/authorized_keys | |
chmod 600 /home/$MYUSER/.ssh/authorized_keys | |
chmod 700 /home/$MYUSER/.ssh |
This file contains hidden or 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 | |
cert=$1 | |
key=$2 | |
MD51=$(openssl x509 -text -noout -in $cert -modulus | grep "^Modulus" | openssl md5) | |
MD52=$(openssl rsa -text -noout -in $key -modulus | grep "^Modulus" | openssl md5) | |
if [ "$MD51" == "$MD52" ]; then | |
echo "Match" | |
else | |
echo "Not match" |
This file contains hidden or 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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains hidden or 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
words = [ | |
'apple', | |
'banana', | |
'banana', | |
'foo', | |
'ruby', | |
'apple', | |
'piston', | |
'eagle', | |
'lemon', |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'yaml' | |
m = YAML.load_file('rpm.yml') | |
m.each do |appname, data| |
This file contains hidden or 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 | |
PKG=$1 | |
mkdir -p repos | |
repotrack -c /etc/yum.repos.d/epel.repo -a x86_64 -p repos/ $PKG |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'curl' | |
coll = 'a'.upto('z').to_a + '0'.upto('9').to_a | |
letters = coll.to_a.permutation(3).to_a | |
letters.each do |possible_uname| | |
u_epoint = "https://github.com/" + possible_uname.join("") |
This file contains hidden or 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
#!/usr/bin/env bash | |
[ -z $1 ] && echo "Gimme the PID" && exit 1 | |
PIDNUM=$1 | |
declare -A CURRENT | |
declare -A NEXT | |
export FLAG=0 | |
get_io() { |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Symlink Deploy: | |
# Parameters: | |
# APPNAME : Application name, corresponding to document root | |
# VERSION : The version of the application | |
# ARTIFACT(optional) : | |
# - The path to the artifact, in target machine. | |
# - Default to production shared directory. | |
# | |
APPNAME=$1 |
NewerOlder