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
openssl req -x509 -sha256 -newkey rsa:2048 -nodes -days 7300 -out mycert.crt -keyout mycert.key | |
- Get SHA-1 fingerprint: | |
openssl x509 -noout -in torproject.pem -fingerprint -sha1 | |
- Get SHA-256 fingerprint: | |
openssl x509 -noout -in torproject.pem -fingerprint -sha256 | |
- wildcard ones | |
https://serversforhackers.com/self-signed-ssl-certificates |
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
git checkout master | |
git pull upstream master | |
git checkout branch_name | |
git rebase master | |
-- conflicts show up | |
-- fix them | |
git rebase --continue | |
-- might have to git commit here, i don't remember | |
git push origin branch_name |
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
sudo salt -C 'G@oscodename:precise and storage*-v1-*' cmd.run "echo '30 00,03,09,12,15,18,21 * * * echo 0>/var/log/error'>/var/spool/cron/crontabs/root; chgrp crontab /var/spool/cron/crontabs/root; chmod 600 /var/spool/cron/crontabs/root" |
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
#!/usr/bin/python | |
import sys | |
import time | |
def get_trans_id_time(trans_id): | |
if len(trans_id) >= 34 and trans_id[:2] == 'tx' and trans_id[23] == '-': | |
try: | |
return int(trans_id[24:34], 16) | |
except ValueError: | |
pass |
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
pgrep -cf swift-object-server &>/dev/null && exit 1 | |
for controller in `omreport storage controller | grep '^ID' | awk '{print $NF}' | grep -v '^0'` | |
do | |
for unit in {0..44} | |
do | |
/opt/dell/srvadmin/bin/omreport storage pdisk controller=${controller} vdisk=${unit} | grep -q "TOSHIBA DT01ACA300" && grep "c${controller}u${unit} " /etc/fstab | grep -vq inode64 | |
if [ $? -eq 0 ] | |
then | |
echo "Starting to re-align c${controller}u${unit}" | |
sudo umount /srv/node/c${controller}u${unit} |
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
#!/usr/bin/env python | |
# coding=utf8 | |
# Copyright (C) 2010 Saúl ibarra Corretgé <[email protected]> | |
# | |
""" | |
pydmesg: dmesg with human-readable timestamps | |
""" |
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
Create a self-signed (wildcard) SSL certificate | |
Posted on March 11, 2006, 11:35 pm, by justin, under HOWTOs, Linux. | |
The following commands are all you need to create a self-signed (wildcard, if you want) SSL certificate: | |
mkdir /usr/share/ssl/certs/hostname.domain.com | |
cd /usr/share/ssl/certs/hostname.domain.com | |
(umask 077 && touch host.key host.cert host.info host.pem) | |
openssl genrsa 2048 > host.key | |
openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert |
NewerOlder