openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar
openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar
| <style> | |
| .Alert { | |
| padding: 2em; | |
| } | |
| .Alert-Success { | |
| border: 10px solid green; | |
| } | |
| .Alert-Error { | |
| border: 10px solid red; | |
| } |
openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar
openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar
| <?php | |
| /** | |
| * GitHub webhook handler template. | |
| * | |
| * @see https://developer.github.com/webhooks/ | |
| * @author Miloslav Hůla (https://github.com/milo) | |
| */ | |
| $hookSecret = 's.e.c.r.e.t'; # set NULL to disable check |
| sudo mkdir -m 0700 /var/www/.ssh | |
| sudo chown -R ubuntu:www-data /var/www/.ssh | |
| # one problem here is I do not know who the exec command is executing as. | |
| sudo -u ubuntu ssh-keygen (empty passphrase) | |
| sudo -u ubuntu ssh -T [email protected] | |
| # this adds git to the recognized list of /var/www/.ssh/known_hosts | |
| # paste public key into repo manager | |
| cd (git repo) | |
| sudo -u apache git pull origin branch |
| # https://github.com/causes/scss-lint/tree/master/lib/scss_lint/linter | |
| exclude: 'app/assets/stylesheets/settings/*' | |
| linters: | |
| BorderZero: | |
| enabled: true | |
| ColorKeyword: | |
| enabled: false | |
| Comment: |
| <?php | |
| /** | |
| * Class CachedPDOStatement | |
| * | |
| * CachingIterator for a PDOStatement | |
| */ | |
| class CachedPDOStatement extends CachingIterator | |
| { | |
| private $index; |
| (function addXhrProgressEvent($) { | |
| var originalXhr = $.ajaxSettings.xhr; | |
| $.ajaxSetup({ | |
| progress: function() { console.log("standard progress callback"); }, | |
| xhr: function() { | |
| var req = originalXhr(), that = this; | |
| if (req) { | |
| if (typeof req.addEventListener == "function") { | |
| req.addEventListener("progress", function(evt) { | |
| that.progress(evt); |