Skip to content

Instantly share code, notes, and snippets.

@ezimuel
ezimuel / sign.sh
Created March 14, 2016 15:50
Sign and verify a file using OpenSSL command line tool. It exports the digital signature in Base64 format.
#!/bin/bash
# Sign a file with a private key using OpenSSL
# Encode the signature in Base64 format
#
# Usage: sign <file> <private_key>
#
# NOTE: to generate a public/private key use the following commands:
#
# openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048
# openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem
@wienczny
wienczny / phabricator-aphlict.service
Created November 17, 2015 15:18
Phabricator Systemd Units
[Unit]
Description=Phabricator Aphlict
After=syslog.target network.target mysql.service
[Service]
Type=forking
User=phabricator
Group=phabricator
ExecStart=/srv/http/phabricator/bin/aphlict start
ExecStop=/srv/http/phabricator/bin/aphlict stop
@jamband
jamband / console.php
Created July 16, 2012 04:50
Yii Framework: console command in module.
<?php
'commandMap' => array(
'deleteexpireduser' => array(
'class' => 'application.modules.user.commands.DeleteExpiredUserCommand',
),
),