Skip to content

Instantly share code, notes, and snippets.

View IchHabRecht's full-sized avatar

Nicole Hummel IchHabRecht

  • biz-design
  • Berlin, Germany
View GitHub Profile
@IchHabRecht
IchHabRecht / gist:6299970
Created August 21, 2013 20:40
[APACHE] SSL certificate
Step 1: Generate a Private Key
openssl genrsa -des3 -out server.key 1024
Step 2: Generate a CSR (Certificate Signing Request)
openssl req -new -key server.key -out server.csr
Step 3: Remove Passphrase from Key
cp server.key server.key.old
openssl rsa -in server.key.old -out server.key
@IchHabRecht
IchHabRecht / gist:6299898
Created August 21, 2013 20:36
[BASH] Enable git tab completion
# Enable current git branch to bash promt
# nano /root/.bashrc
if [ -f /etc/bash_completion.d/git ]; then
. /etc/bash_completion.d/git
fi
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w $(__git_ps1 "(%s)")\$ '
@IchHabRecht
IchHabRecht / gist:6299857
Created August 21, 2013 20:33
[TYPO3] Extbase eid bootstrap
<?php
/***************************************************************
* Copyright notice
*
* (c) 2011 Nicole Cordes <[email protected]>, CPS-IT GmbH
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@IchHabRecht
IchHabRecht / gist:6299846
Created August 21, 2013 20:33
[VCL] Basic Varnish configuration for TYPO3
sub vcl_recv {
# Set backend
set req.backend = default;
if (req.http.host ~ "gitweb.squeezebox.vm") {
return (pass);
}
# Set a unique cache header with client ip
if (req.http.x-forwarded-for) {
@IchHabRecht
IchHabRecht / gist:6299817
Created August 21, 2013 20:30
[BASH] Sort directories by size
du -k | sort -nr
du -m | sort -nr
du -B 1024 | sort -nr
du -B 1048576 | sort -nr
du -B 1073741824 | sort -nr
@IchHabRecht
IchHabRecht / gist:6299812
Created August 21, 2013 20:30
[APACHE] Load other PHP version with FastCGI
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/Apache2/htdocs/localhost"
ServerName localhost.local
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" combined
<Directory "C:/Apache2/htdocs/localhost">
Options FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
@IchHabRecht
IchHabRecht / gist:6299782
Created August 21, 2013 20:28
[CSS] Enable Webfonts local in Firefox
about:config security.fileuri.strict_origin_policy = false
@IchHabRecht
IchHabRecht / gist:6299775
Last active December 21, 2015 11:38
[APACHE] SSL certificate under Windows 7
cd "C:\Program Files (x86)\Apache2\bin"
openssl req -config ../conf/openssl.cnf -new -out XXX.csr -keyout XXX.pem
>> Fill in "PEM pass phrase" and "Common Name"
openssl rsa -in XXX.pem -out XXX.key
>> Delete the .rnd file
@IchHabRecht
IchHabRecht / gist:6299725
Created August 21, 2013 20:23
[JS] Columns of same length
<script type="text/javascript">
<!--
jQuery.noConflict();
jQuery(document).ready(function() {
var wrapper = jQuery('div#wrapper_content').find('div#wrapper_columns');
if (wrapper.length > 0) {
jQuery('div#column_left > div').each(function(index){
var h = Math.max(jQuery(this).height(), jQuery('div#column_right > div').eq(index).height());
jQuery(this).height(h);
jQuery('div#column_right > div').eq(index).height(h);
@IchHabRecht
IchHabRecht / gist:6299702
Created August 21, 2013 20:21
[Bash] Count files found by find
find -type f -name *.pdf | wc -l