Skip to content

Instantly share code, notes, and snippets.

@echo off
set /p domain="Enter Domain: "
set OPENSSL_CONF=../conf/openssl.cnf
if not exist .\%domain% mkdir .\%domain%
set dir="%cd%"
cd ..\php
..\php\extras\openssl\openssl.exe req -config %dir%\cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %dir%\%domain%\server.key -x509 -days 365 -out %dir%\%domain%\server.crt
@airways
airways / softsalefile-to-license.php
Created April 15, 2020 17:05 — forked from cgi-caesar/softsalefile-to-license.php
Soft File to License Scheme Plugin
<?php
/**
* @title Soft File to License Scheme
* @path application/default/plugins/misc/softsalefile-to-license.php
*/
class Am_Plugin_SoftsalefileToLicense extends Am_Plugin
{
const PLUGIN_STATUS = self::STATUS_PRODUCTION;
@airways
airways / export_csv.php
Last active December 7, 2015 14:37 — forked from apocratus/export_csv.php
Export MySQL to CSV (php script)
<?php
// database table to be exported
$db_table = 'XXXXXXXXX';
// optional where query
$where = 'WHERE 1 ORDER BY 1';
// filename for export
$csv_filename = 'db_export_'.$db_table.'_'.date('Y-m-d').'.csv';
// database variables
$hostname = "localhost";
@airways
airways / gist:2069111
Created March 18, 2012 05:19 — forked from neilj/gist:1532562
Sugared DOM: Better Than Templates
var el = ( function () {
var doc = document;
var directProperties = {
'class': 'className',
className: 'className',
defaultValue: 'defaultValue',
'for': 'htmlFor',
html: 'innerHTML',

Installing and configuring dwm on OS X

  1. Install X11.app (it's on the OS X install disk or something.)

  2. Install dwm. You have to customize config.h a bit:

    1. Replace { MODKEY|ShiftMask, XK_q, quit, {0} }, with { MODKEY|ControlMask, XK_q, quit, {0} }, to avoid colliding with the Log Out shortcut in the Apple menu.

    If you install dwm from Homebrew, brew install dwm, this is done automatically.

Installing and configuring dwm on OS X

  1. Install X11.app (it's on the OS X install disk or something.)

  2. Install dwm. You have to customize config.h a bit:

    1. Replace { MODKEY|ShiftMask, XK_q, quit, {0} }, with { MODKEY|ControlMask, XK_q, quit, {0} }, to avoid colliding with the Log Out shortcut in the Apple menu.

    If you install dwm from Homebrew, brew install dwm, this is done automatically.