Skip to content

Instantly share code, notes, and snippets.

View timglabisch's full-sized avatar

Tim Glabisch timglabisch

View GitHub Profile
@timglabisch
timglabisch / website-var-cli-download-revisions.php
Created April 16, 2012 15:58
pimcore download all revisions
<?php
// now you can use $args ...
include_once(__DIR__."/../../pimcore/cli/startup.php");
Pimcore_Version::$revision = 10;
$updates = Pimcore_Update::getAvailableUpdates();
$buffer = array();
@timglabisch
timglabisch / area.xml
Created April 18, 2012 21:10
PIMCORE-1481
<?xml version="1.0"?>
<zend-config xmlns:zf="http://framework.zend.com/xml/zend-config-xml/1.0/">
<id>sample</id>
<name>sample</name>
<description>Embed contents from other URL (websites) via iframe</description>
<!-- the icon is optional, see above for details (this node is normally used to refer to an icon in the pimcore core icon-set) -->
<icon>/pimcore/static/img/icon/html.png</icon>
<version>1.0</version>
<myCustomConfig>MyValue</myCustomConfig>
</zend-config>
@timglabisch
timglabisch / gist:2961728
Created June 20, 2012 19:34
intelliJ getVariats
/**
* look at
* http://grepcode.com/file/repository.grepcode.com/java/ext/com.jetbrains/intellij-idea/10.0/com/intellij/psi/PsiReference.java#PsiReference.getVariants%28%29
***
package de.pimcore.psi.view;
import com.intellij.codeInsight.lookup.LookupValueFactory;
import com.intellij.lang.ASTNode;
import com.intellij.openapi.project.Project;
@timglabisch
timglabisch / gist:3486822
Created August 27, 2012 09:09
mysql enable logging
SET GLOBAL Profiling = "ON";
SET GLOBAL log_output = "TABLE";
SET GLOBAL long_query_time = 1;
SET GLOBAL log_queries_not_using_indexes = "ON";
SET GLOBAL general_log = "ON";
SET GLOBAL slow_query_log = "ON";
SET GLOBAL min_examined_row_limit = 10;
//websocket-----------------------------------------------------------------
var io = require("socket.io").listen(72);
io.sockets.on('connection', function (socket) {
socket.send("Start<br>");
socket.on('disconnect', function () {
console.log("Connection terminated");
});
});
@timglabisch
timglabisch / gist:3777632
Created September 24, 2012 18:58
server
class Main
constructor: ->
@clients = [];
@tcpServer = new net.createServer();
listen:(@port) ->
@tcpServer.on('connection', (->
client = (new Client).setServer(this);
@clients.push(client);
# this describs why i hate the puppet execution flow.
# i am new to puppet but really tryed to find a good solution.
# My main problem is that i want to find a nice way to handel different modules
# and some webservers. the modules shouldnt know from other modules (dependencies)
# like iptables shouldnt know about nginx or ssh.
# on the other site, the webserver should know how the firewall should be configured.
# so the webserver knows about all dependencies.
# i started to create a module for nginx, iptables and the webserver.
# nginx mustn't know webserver
# nginx mustn't know iptables
@timglabisch
timglabisch / gist:3952878
Created October 25, 2012 14:32
Postgre Sql Indizes Required Size
SET search_path TO ic,public;
SELECT pg_size_pretty(sum(index_size_raw)::bigint) FROM (
SELECT
t.tablename,
indexname,
c.reltuples AS num_rows,
pg_size_pretty(pg_relation_size(quote_ident(t.tablename)::text)) AS table_size,
pg_size_pretty(pg_relation_size(quote_ident(indexrelname)::text)) AS index_size,
pg_relation_size(quote_ident(indexrelname)::text) as index_size_raw,
@timglabisch
timglabisch / gist:3958747
Created October 26, 2012 13:15
xdebug config
#xdebug.profiler_enable_trigger = 1
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.idekey = "PHPSTORM"
xdebug.max_nesting_level = 10000000
xdebug.default_enable = 1
php_flag xdebug.default_enable Off
php_flag xdebug.overload_var_dump Off
php_flag xdebug.show_exception_trace Off
@timglabisch
timglabisch / ws.c
Created January 6, 2013 23:19 — forked from anonymous/ws.c
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
// WORKSPACE BEISPIEL
// FreeBsd Lizenziert
// tim glabisch
//
// Ein Workspace ermöglicht, dass beliebige variablen darin abgelegt werden, der komplette