Skip to content

Instantly share code, notes, and snippets.

View joachimdoerr's full-sized avatar

Joachim Dörr joachimdoerr

View GitHub Profile
@joachimdoerr
joachimdoerr / different-characters-for-firefox.css
Last active September 28, 2015 03:38
the best way to differentiate characters for IE6,7,8 and Firefox
@-moz-document url-prefix() {
// only firefox
}
@joachimdoerr
joachimdoerr / clearfix.css
Created November 19, 2011 15:06
micro clearfix methode
// ----------------------------------------------------- ~ css syntax
.cf:before, /* for modern browsers */
.cf:after {
content:"";
display:table;
}
.cf:after {
clear:both;
}
.cf { /* for IE6,7 */
@joachimdoerr
joachimdoerr / jquery.simple-submit.js
Created November 24, 2011 20:34
simple way for ajax-form-submit
$(document).ready(function(){
$("form").submit(function(){
var thistarget = this.target;
jQuery.ajax({
data: $(this).serialize(),
url: this.action,
type: this.method,
error: function() {
$(thistarget).html("Error: Failed to submit form!");
},
@joachimdoerr
joachimdoerr / jquery.images-loader-deferred.js
Created November 26, 2011 10:37
jquery check: are images loading
// deferred obj callback
function loadImg(selector) {
var dfd = $.Deferred();
$(selector).load(function() { dfd.resolve(); });
return dfd.promise();
}
// more elements
$.when(
loadImg('#img1'),
@joachimdoerr
joachimdoerr / kickstart.html
Created November 27, 2011 02:39
fundamental xhtml site structure - Kickstart-xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Kickstart-xhtml</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="robots" content="index, follow" />
@joachimdoerr
joachimdoerr / .htaccess
Created March 22, 2013 13:41
Sinnvolle Alltags-".htaccess" Befehle
# auf domain auf www.domain umleiten
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]
# www entfernen
RewriteEngine On
RewriteCond %{HTTP_HOST} !^mydomain.com$ [NC]
RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301]
<?php
$nav = new advanced_rex_navigation();
$main_navigation = $nav->get(0,3,FALSE,TRUE,'main');
// 'main' ist der name des navigationstyps
// bitte anpassen je nach einstellung im meta-info-addon
/* weitere setter methoden:
$nav->setClasses(array('menu_item'));
$nav->setSeperator('/');
// jQuery.support.transition
// to verify that CSS3 transition is supported (or any of its browser-specific implementations)
$.support.transition = (function(){
var thisBody = document.body || document.documentElement,
thisStyle = thisBody.style,
support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined;
return support;
})();

PHPSecLib User Testing

The following is an extract of a poem. This is the text we will be using as our example input for encrypting with a password.

Twisted and gnarled, these roots run deep into realms that open whilst I sleep;
designing a counterfeit system composed of intricately versed poem.

Next, we have the password in which we shall encrypt everything with.

@joachimdoerr
joachimdoerr / mou.md
Last active September 3, 2015 13:14 — forked from zhenyi2697/mou.md
markdown: mou demo

Mou

Mou icon

Overview

Mou, the missing Markdown editor for web developers.

Syntax