Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@marekhrabe
marekhrabe / openssl-self-signed-san-certificate.md
Created January 8, 2019 17:14 — forked from jdeathe/openssl-self-signed-san-certificate.md
How to generate a self-signed SAN SSL/TLS certificate using openssl

How to generate a self-signed SAN SSL/TLS certificate using openssl

Generating a self-signed certificate is a common taks and the command to generate one with openssl is well known and well documented. Generating a certificate that includes subjectAltName is not so straght forward however. The following example demonstrates how to generate a SAN certificate without making a permanent change to the openssl configuration.

Generate a list of all required DNS names, (Note: CN will be discarded).

$ export SAN="DNS:www.domain.localdomain,DNS:domain.localdomain"
test
@marekhrabe
marekhrabe / remove-link.js
Last active June 2, 2016 17:45
Remove link between Sketch file and Avocode Manager Design
// Copy Layer List to Clipboard
// Change this variables to configure the script:
var COPY_LAYER_TYPE = true,
TRAVERSE_GROUPS = true,
INDENT_GROUPS = true
var strRepeat = function(str, qty) {
if (qty < 1) return '';
/*
WorkCrew - a WebWorker work queue library
Usage:
// Create an 8 worker pool using worker.js.
var crew = new WorkCrew('worker.js', 8);
// Do something whenever a job is completed.
// The result object structure is
@marekhrabe
marekhrabe / animatedScrollTo.js
Created March 9, 2014 15:46
Animated scrolling without any dependency on libraries. If user scrolls when animation is running, scroll animation would be immediately canceled.
window.requestAnimFrame = (function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60);};})();
var easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) return c/2*t*t + b;
t--;
return -c/2 * (t*(t-2) - 1) + b;
};
var animatedScrollTo = function (element, to, duration) {
@test: red;
@marekhrabe
marekhrabe / generator-plugin.js
Last active March 8, 2017 06:46
Using Photoshop generator plugin together with HTML panel. Pseudo-untested-code
exports.init = function (generator, config) {
var io = require('socket.io').listen(1234); // put your unique port here
io.sockets.on('connection', function (socket) {
socket.emit('message', 'i am ready');
socket.on('doStuff', function (data) {
generator.getDocumentInfo().then(function (document) {
socket.emit('message', 'working with document…');
}, function (err) {
console.log(err);
@marekhrabe
marekhrabe / index.html
Last active December 31, 2015 04:39
Source landing pages user session solution
<header id="sourceheader">
<a href="https://madebysource.com/"><strong id="sourceuser"></strong><span>Log in</span></a>
</header>
<script>
(function () {
var signedIn = false;
var signedInClass = 'signedin';
var header = document.getElementById('sourceheader');
@marekhrabe
marekhrabe / source-header.less
Last active December 27, 2015 04:18
new logotype
// variables - change only these
@headerBg: #1f1f1f;
@headerText: #a4a4a4;
@headerActive: #c63926;
@headerNotification: #579aff;
// computed
@headerDivider: fade(@headerText, 22%);
// styles