Skip to content

Instantly share code, notes, and snippets.

@onefriendaday
onefriendaday / php-symfony-httpcache
Last active September 13, 2016 15:33
php-symfony-httpcache
Server Software:
Server Hostname: localhost
Server Port: 3000
Document Path: /de/home/
Document Length: 11180 bytes
Concurrency Level: 20
Time taken for tests: 4.918 seconds
Complete requests: 200
@onefriendaday
onefriendaday / php
Created September 13, 2016 15:01
PHP
Server Software:
Server Hostname: localhost
Server Port: 3000
Document Path: /de/home/
Document Length: 11180 bytes
Concurrency Level: 20
Time taken for tests: 10.143 seconds
Complete requests: 200
@onefriendaday
onefriendaday / Node
Last active September 13, 2016 15:59
Nodejs vs. PHP
Server Software:
Server Hostname: localhost
Server Port: 3300
Document Path: /de/home/
Document Length: 15462 bytes
Concurrency Level: 20
Time taken for tests: 4.585 seconds
Complete requests: 200
module.exports = {
props: ['schema', 'model'],
template: 'test'
}
module.exports = {
props: ['schema', 'model'],
template: 'test'
}
json = {
"component": "root",
"body": [
{
"component": "headline",
"text": "42323"
}
]
}
(function ($) {
$(document).ready(function () {
if (['#download-container', '#video-container'].indexOf(window.location.hash) > -1 || window.location.hash.indexOf('video-play') > -1) {
if (window.location.hash.indexOf('video-play') > -1) {
var container = $('#video-container');
} else {
var container = $(window.location.hash);
}
@onefriendaday
onefriendaday / .htaccess
Last active August 31, 2015 10:36
Block IP
RewriteCond %{REMOTE_HOST} !^62\.99\.210\.9
RewriteCond $1 !^(wartung_index\.php|images/)
RewriteRule ^(.*)$ /wartung_index.php/$1 [L]
RewriteCond %{HTTP_X_FORWARDED_FOR} !^62\.99\.210\.9
RewriteCond $1 !^(wartung_index\.php|images/)
RewriteRule ^(.*)$ /wartung_index.php/$1 [L]
@onefriendaday
onefriendaday / gist:6b347b186171ec140688
Created May 4, 2015 05:40
Browserify Grunt example
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-browserify');
grunt.registerTask('default',['watch']);
// Project configuration.
grunt.initConfig({
if (isset($_FILES['file'])) {
move_uploaded_file($_FILES['file']['tmp_name'], 'tmp/'.$_FILES['file']['name']);
}