Skip to content

Instantly share code, notes, and snippets.

View d1rk's full-sized avatar
🖖
Live long and prosper!

Dirk Brünsicke d1rk

🖖
Live long and prosper!
View GitHub Profile
@d1rk
d1rk / .zshrc
Last active January 15, 2018 19:31 — forked from rgrinberg/.zshrc
zplug plugins for usage with zplug.sh
zplug "plugins/git", from:oh-my-zsh, if:"(( $+commands[git] ))"
zplug "plugins/tmux", from:oh-my-zsh, if:"(( $+commands[tmux] ))"
zplug "plugins/docker", from:oh-my-zsh
zplug "plugins/docker-compose", from:oh-my-zsh
zplug "plugins/command-not-found", from:oh-my-zsh
zplug "plugins/common-aliases", from:oh-my-zsh
zplug "plugins/compleat", from:oh-my-zsh
zplug "plugins/git-extras", from:oh-my-zsh
#!/bin/bash
# __
# _____ ____ _/ |_ ____ ____ _______
# / \ _/ __ \ \ __\_/ __ \ / _ \ \_ __ \
# | Y Y \\ ___/ | | \ ___/ ( <_> ) | | \/
# |__|_| / \___ > |__| \___ > \____/ |__|
# \/ \/ \/
#
# .___
# __| _/ __ __ _____ ______
FROM ubuntu:13.04
MAINTAINER Johnny Broadway "johnny@johnnybroadway.com"
RUN apt-get update
RUN apt-get install -y wget git vim postfix nginx sqlite
RUN apt-get install -y mysql-server mysql-client
RUN apt-get install -y php5-cli php5-common php5-mysql php5-sqlite php5-curl php5-fpm
RUN wget -O /etc/nginx/sites-available/default https://gist.github.com/jbroadway/6369183/raw/682a1ed8078cc39f59c3624f460b128addff95db/nginx-default
@d1rk
d1rk / user.sh
Last active December 23, 2015 22:39 — forked from jasonmorganson/user.sh
#!/usr/bin/env sh
#
#
# Run with the following command:
#
#
#   wget -q -O - https://gist.github.com/jasonmorganson/4733446/raw/user.sh | sh
#   wget -q -O - http://user.morganson.net | sh

Generating a self signed SSL certificate

Creates a resulting server.crt certificate and server.key private key.

Method one

  • $ openssl genrsa -des3 -out server.key.tmp 1024
    • Note: Enter a dummy pass pharse (e.g. 1234) and remember it
  • $ openssl rsa -in server.key.tmp -out server.key
    • Enter dummy pass pharse from previous step
  • Generate certificate request file (CSR)
  • $ openssl req -new -key server.key -out server.csr
#!/bin/bash
# For PHP5 and /etc/php5/php.ini you would setup like so:
# sendmail_path = "/path/to/sendmailsink.sh"
LOGFILE="/var/log/sendmailsink"
NOW=`date +%Y-%m-%d\ @\ %H:%M:%S`
echo "$NOW || $0 $*" >> $LOGFILE
echo >> $LOGFILE
@d1rk
d1rk / README.md
Created September 4, 2013 13:47 — forked from magnetikonline/README.md

Open Graph tags for the page <head>.

<meta property="og:title" content="title" />
<meta property="og:description" content="desc" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://url.com/" />
<meta property="og:image" content="http://url.com/image.jpg" />
@d1rk
d1rk / cron.php
Created June 28, 2013 21:38 — forked from tmaiaroto/cron.php
<?php
/**
* This script is meant to be executed via crontab.
* It should help you easily set li3 commands as cron jobs.
*
* You should put this in the root of your application.
* However, you don't need to, but you would then need to
* pass a --path= option with the path to your app.
* This is because the li3 console command must be called
* from a specific location.
@d1rk
d1rk / virtual.conf
Last active January 15, 2018 19:24 — forked from tmaiaroto/virtual.conf
nginx configuration with subdomain variable extracting
#
# A virtual host using mix of IP-, name-, and port-based configuration.
# This is based on using Homebrew for OS X. You can use this in other
# cases though, but you'll likely need to adjust some of the paths below.
#
server {
# Replace this port with the right one for your requirements
# listen 80 [default|default_server]; #could also be 1.2.3.4:80
@d1rk
d1rk / Form.php
Last active January 15, 2018 19:25 — forked from wms/Form.php
overwrite li3 default Form->input() to be more bootstrap-ready.
<?php
namespace app\extensions\helper;
class Form extends \lithium\template\helper\Form {
/**
* String templates used by this helper.
*
* @var array