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
GERRIT_SSH_USER=<user> | |
GERRIT_HOST=<gerrit_ip_or_host> | |
GERRIT_PORT=29418 # by default | |
#download commit-message hook | |
gitdir=$(git rev-parse --git-dir); scp -p -P ${GERRIT_PORT} ${GERRIT_SSH_USER}@${GERRIT_HOST}:hooks/commit-msg ${gitdir}/hooks/ | |
chmod +x .git/hooks/commit-msg | |
#Adding "Verified" label | |
mkdir tmp |
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
Common Openstack commands | |
source openrc_v3 | |
openstack domain list | |
openstack project create --domain "domain" projectname | |
# Assign role "admin" to user "user" in project "projectname" | |
openstack role add --project project1 --user user1 admin | |
# Use project and user UUIDs if keystone shows 401 error |
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
ldapsearch -h HOST -D user -w 'password' -b "dc=example,dc=com" cn=somename | |
ldapsearch -h ldaps://ldap-server.example.com -D cn=openstack-ldap,ou=Users,ou=corp,o=com -w password -b ou=Users,ou=corp,o=com "(&(groupMembership=cn=OpenStackUsers,ou=Groups,ou=Corp,o=com))" cn |
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
# http://www.mikesaysmeh.com/how-to-restart-dell-idrac/ | |
# reset iDrack web | |
racadm racreset soft | |
racadm getsysinfo | |
sshpass -p pass ssh user@IP racadm config -g cfgIpmiLan -o cfgIpmiLanEnable 1 | |
# set pxe and reboot | |
ipmitool -I lanplus -H IP -U user -P pass chassis bootdev pxe && ipmitool -I lanplus -H IP -U user -P pass chassis power cycle |
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
#http://lost-and-found-narihiro.blogspot.com/2014/09/ubuntu-1404-guestfish-error.html | |
# update-guestfs-appliance | |
# guestfish | |
#Welcome to guestfish, the guest filesystem shell for | |
#editing virtual machine filesystems and disk images. | |
#Type: 'help' for help on commands | |
'man' to read the manual |
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
# http://gswallow.tumblr.com/post/56275010815/beware-of-nodesave | |
node.set[‘log’] = log | |
original_node = Chef::Node.load(node.name) | |
original_node.set['log’] = log | |
original_node.save | |
end |
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
#https://www.rabbitmq.com/management-cli.html | |
# ./rabbitmqadmin -H 127.0.01 -u rabbit -p password --vhost=/ list queues\ | |
#rabbitmq-plugins enable rabbitmq_management | |
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
# SSH agent autostart | |
SSH_ENV="$HOME/.ssh/environment" | |
function start_agent { | |
echo "Initialising new SSH agent..." | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" | |
echo succeeded | |
chmod 600 "${SSH_ENV}" | |
. "${SSH_ENV}" > /dev/null | |
/usr/bin/ssh-add $HOME/.ssh/id_rsa; | |
} |