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 / 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
@d1rk
d1rk / latest.sh
Created September 21, 2013 12:13
lates changes to php files
find . -type f -name '*.php' -printf '%TY-%Tm-%Td %TT %p\n' | sort
@d1rk
d1rk / colors
Created September 10, 2013 09:20
color-codes
'#F0F8FF',
'#FAEBD7',
'#7FFFD4',
'#F0FFFF',
'#F5F5DC',
'#FFE4C4',
'#000000',
'#FFEBCD',
'#8A2BE2',
'#A52A2A',

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 / local.ini
Created September 3, 2013 13:57
local php.ini settings
date.timezone = "Europe/Berlin"
memory_limit = 1G
post_max_size = 1G
upload_max_filesize = 1G
max_input_time = 0
@d1rk
d1rk / Preferences.sublime-settings
Last active December 20, 2015 02:38
Sublime Text 2 Preferences
{
// IDE options
"caret_style": "wide",
"auto_complete": true,
"auto_complete_delay": 0,
"auto_match_enabled": true,
"bold_folder_labels": true,
"fade_fold_buttons": false,
"find_selected_text": true,
"highlight_line": true,
@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 / rummik.zsh
Created April 7, 2013 20:18
zsh rc files
# taken from https://raw.github.com/rummik/dotfiles/master/zshrc
# Ayup
export PATH=$PATH:~/.bin
export EDITOR=vim
export BROWSER=$(which google-chrome chromium-browser firefox links2 links lynx | grep -Pm1 '^/')
which links2 >/dev/null && alias links=links2
which htop >/dev/null && alias top=htop
which ack-grep >/dev/null && alias ack=ack-grep
which mosh >/dev/null && alias mosh='mosh -a'