Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -out ca.key 2048
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# how to redirect from one port to another using iptables | |
### | |
# install following package in order to preserve the iptables rules | |
sudo apt-get install iptables-persistent | |
# redirect from port 80 to port 8000 | |
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8000 | |
# redirect from one IP to other |
# Show all grants | |
mysql --skip-column-names -e "SELECT user, host FROM mysql.user" | sed 's/\t/"@"/g; s/^/SHOW GRANTS FOR "/g; s/$/";/g;' | mysql --skip-column-names |
Use folowing steps to repackage dep package: | |
1: Extract deb package | |
# dpkg-deb -x <package.deb> <dir> | |
2: Extract control-information from a package | |
# dpkg-deb -e <package.deb> <dir/DEBIAN> | |
3. After completed to make changes to the package, repack the deb | |
# dpkg-deb -b <dir> <new-package.deb> |
def compile_asset?(path) | |
# ignores any filename that begins with '_' (e.g. sass partials) | |
# all other css/js/sass/image files are processed | |
if File.basename(path) =~ /^[^_].*\.\w+$/ | |
puts "Compiling: #{path}" | |
true | |
else | |
puts "Ignoring: #{path}" | |
false | |
end |