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
[req] | |
default_bits=1024 | |
default_keyfile=private.key | |
encrypt_key=no | |
prompt=no | |
distinguished_name=req_distinguished_name | |
x509_extensions = v3_req | |
req_extensions=v3_req | |
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
openssl rsa -des3 -in privkey.pem -out privkey.pem.new |
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
:%s/foo/bar/g | |
Find each occurrence of 'foo' (in the current line only), and replace it with 'bar'. | |
:%s/foo/bar/g | |
Find each occurrence of 'foo' (in all lines), and replace it with 'bar'. | |
:%s/foo/bar/gc | |
Change each 'foo' to 'bar', but ask for confirmation first. | |
:%s/\<foo\>/bar/gc |
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
sed -i 's/search/replace/g' file |
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 -x -D login@domain -W -H ldap://server:389 -LLL -b "base" '(filter)' |
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
import imp | |
<module> = imp.load_source('<module>', '<module_path.py>') |
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
$in = fopen('file.txt', 'rb'); | |
while($line = fgets($in)) { | |
// $line is a line of file | |
} |
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 python | |
# -*- coding: utf-8 -*- |
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
lxctl create fqdn --ostemplate=ubuntu-12.04-amd64 --rootsz=10G --ipaddr ip --netmask netmask --defgw gw --hostname fqdn --userpasswd user:passwd --mtu 1500/8950 --autostart=1 |
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
SELECT col1, col2 FROM table1 PROCEDURE ANALYSE()\G; |