Skip to content

Instantly share code, notes, and snippets.

@indrekots
indrekots / autoloader.php
Last active December 24, 2015 23:59
Require PHP app autoloader
<?php
require_once '/path/to/app/autoloader.php';
...
?>
@indrekots
indrekots / cron.sh
Created October 8, 2013 12:22
Setting cron job for user www-data
sudo -u www-data crontab -e
@indrekots
indrekots / output.txt
Last active December 24, 2015 23:49
Example output while creating a new certificate with Java keytool
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: John Smith
What is the name of your organizational unit?
[Unknown]: John's Diner
What is the name of your organization?
[Unknown]: John's Diner
What is the name of your City or Locality?
[Unknown]: Paris
@indrekots
indrekots / keytool.sh
Created October 8, 2013 11:13
Create a new keystore with Java keytool
$JAVA_HOME/bin/keytool -genkey -alias mydomain -keyalg RSA -keystore /path/to/keystore
@indrekots
indrekots / server.xml
Created October 8, 2013 11:05
Tomcat server.xml connector conf for enabling SSL
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/path/to/keystore"
keystorePass="password" />
<?php
echo "Hello World\n";
?>