screen
openssl dhparam -out dhparams.pem 4096 &```
This can take up to an hour, so starting in `screen` will allow you to come back later :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: 'EntypoRegular'; | |
src: url('font/entypo.eot'); | |
src: url('font/entypo.eot?#iefix') format('embedded-opentype'), | |
url('font/entypo.woff') format('woff'), | |
url('font/entypo.ttf') format('truetype'), | |
url('font/entypo.svg#EntypoRegular') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################################################ | |
# | |
# Place this script in /etc/ssl/private and chown it root and chmod 700 | |
# | |
# This script will generate basic OpenSSL files and self-sign a certificate | |
# | |
# Usage is `gencert domain.name` and the result is domain.name.{key,csr,crt,pem} | |
# If the domain name provided is a wildcard, the asterisk is replaced with an underscore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Helper script used to back up your gnupg directory | |
# | |
# Author: Ben Dechrai <[email protected]> | |
# License: GPLv3 <http://www.gnu.org/licenses/gpl-3.0.txt> | |
# | |
# Installation instructions: | |
# wget https://gist.githubusercontent.com/bendechrai/8bbde547642404a4986c/raw/8049dcd7def5b2c96c28c7dd3b09933d2d5c9190/gnupg_backup -O ~/.gnupg/backup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ug = 'Melbourne-PHP-Users-Group'; // Usergroup slug | |
$eid = '202990892'; // Event ID | |
$html = file_get_contents("http://www.meetup.com/$ug/events/$eid/"); | |
preg_match_all("#<a href=\"http://www.meetup.com/$ug/members/[0-9]*\">([^<]*)</a>#", $html, $array); | |
$names = $array[1]; | |
$winner = array_rand( array_unique( $names )); | |
echo $names[$winner] . "\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
/** | |
* Simple parser of Westpac statements | |
* @author Ben Dechrai <[email protected]> | |
* @license http://www.json.org/license.html | |
* | |
* Run ./parse-westpac input.txt output.csv | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Mailman Always Discard and Ban | |
// @namespace https://bendechrai.com/ | |
// @description Automatically selects "Discard" and ticks the "Add" and Ban" checkboxes on Mailman admin requests for pending messages | |
// @downloadURL TBA | |
// @match *://*/mailman/admindb/* | |
// @match *://*/lists/admindb/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
textarea.placeholder { | |
color: #aaa; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for meta in /etc/letsencrypt/renewal/*conf | |
do | |
DOMAIN=`basename $meta | sed 's,.conf$,,'` | |
# Does the domain appear as a servername in any config file | |
if [ $(grep -E "^[ \t]*server_name\W+(.*[ \t])?$DOMAIN[ \t;]" /etc/nginx/sites-enabled/*| wc -l) -gt 0 ] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cc_number = "4444 3333 2222 1111"; | |
$p = new Payment(); | |
$p->processPayment($cc_number); | |
class Payment { | |
static $url = 'https://api.paypal.com/web_run/f'; |
OlderNewer