Skip to content

Instantly share code, notes, and snippets.

View Thinkscape's full-sized avatar

Arthur Bodera Thinkscape

View GitHub Profile
@Thinkscape
Thinkscape / mysql-backup-all.sh
Created March 27, 2012 11:38
Backup all mysql databases to separate archives, each table in separate file.
#!/bin/bash
#
# Backup all databases to separate archives.
# 1. Each table is dumped into separate *.sql file.
# 2. Each view is dumped into separate file with DEFINER=CURRENT_USER.
# 3. All routines are dumped into routines-dbname.sql,
# 4. All files are added to archive dbname.7z, compressed with 7-zip, max compression.
#
# Usage: mysqlback.sh /output/directory
#
@Thinkscape
Thinkscape / extjs-capture.js
Created July 17, 2012 11:06 — forked from inakiabt/extjs-capture.js
ExtJs debug : capture all events
// to capture ALL events use:
Ext.util.Observable.prototype.fireEvent =
Ext.Function.createInterceptor(Ext.util.Observable.prototype.fireEvent,function(evt) {
var a=arguments;
console.log(this,this.$className + ' fired event '+ evt +' with args ',Array.prototype.slice.call(a,1,a.length));
return true;
});
// to capture events for a particular component:
Ext.util.Observable.capture(
@Thinkscape
Thinkscape / gist:3129794
Created July 17, 2012 14:40
SM and normalization
[16:30] <Zend\Bot> ralphschindler, Thinkscape wants me to remind you to tell ocramius and Thinkscape why do we normalize names and aliases in Service Manager? (written 0 minutes ago)
[16:31] <ralphschindler> did you guys figure that one out already? ;)
[16:31] <Thinkscape> ralphschindler: ;) not really
[16:31] <ezimuel> Thinkscape: we are improving the doc2rst conversion script, I will re-run the script on the entire documentation in a while
[16:32] <Thinkscape> ezimuel: ok, thx.
[16:32] <Thinkscape> ralphschindler: couldn't we just remove it and depend on 1:1 mappings ?
[16:32] <ralphschindler> ultimately, it can be changed. In my world of programming, service names are not supposed to be strict, for the same reasons PHP's functions and methods are not strict
[16:33] <ralphschindler> that looseness is there to promote service reuse
[16:33] <ralphschindler> why penalize one 3rd party developer when he uses 'db' and another uses 'Db'
[16:33] <ralphschindler> they effectively are talking about the same service
c:\Program Files (x86)\Git\bin\git.exe pull --rebase --progress juriansluiman refs/heads/feature/console
From https://github.com/juriansluiman/zf2
* branch feature/console -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: Add strictMode for AbstractOptions
Applying: Simplify strictMode to just a property
Applying: Controller plugin that will help with PRG (see wikipedia link below)
Applying: unit tests for prg plugin
Applying: docblocks for prg plugin
Applying: docs for prg plugin
@Thinkscape
Thinkscape / gist:3177039
Created July 25, 2012 16:17
zf2-docs errors
root@krowa:/var/www/experiments/zf2-docs/docs# mc
root@krowa:/var/www/experiments/zf2-docs/docs# make html
cp languages/en/conf languages/en/conf.py
cp: cannot stat `languages/en/conf': No such file or directory
make: [html] Error 1 (ignored)
sphinx-build -b html -d _build/doctrees languages/en _build/html
Making output directory...
Running Sphinx v0.6.6
loading pickled environment... not found
@Thinkscape
Thinkscape / gist:3426581
Created August 22, 2012 15:07
Optware on DD-WRT with TL-WR1043ND
# From: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=86912
# 1. Prepare the USB disk
# Create an ext3 partition using GParted for instance
#2. Configure DD-WRT
#Under Services->Services->Secure Shell:
#* Enable SSHd
#* Click Apply Settings
#
#!/bin/sh
# Copyright (C) 2006-2011 OpenWrt.org
# Copyright (C) 2006 Fokus Fraunhofer <carsten.tittel@fokus.fraunhofer.de>
debug () {
${DEBUG:-:} "$@"
}
mount() {
busybox mount "$@"
@Thinkscape
Thinkscape / _.md
Created August 31, 2012 14:56 — forked from anonymous/inlet.js
playing with joins and transitions
<?php
/*
* qtfaststart.php v0.1 by Valentin Schmidt
* based on qt-faststart.c v0.2 by Mike Melanson (melanson@pcisys.net)
*
* This file is placed in the public domain. Use the program however you
* see fit.
*
* This utility rearranges a Quicktime file such that the moov atom
* is in front of the data, thus facilitating network streaming.
@Thinkscape
Thinkscape / gist:4118357
Created November 20, 2012 14:46
php54 brew failure
This file has been truncated, but you can view the full file.
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install php54 --with-mysql --with-imap --with-intl --with-homebrew-openssl
==> Downloading http://www.php.net/get/php-5.4.8.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php54-5.4.8
/usr/bin/tar xf /Library/Caches/Homebrew/php54-5.4.8
==> ./configure --prefix=/usr/local/Cellar/php54/5.4.8 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.4 --with-config-file-path=/usr/local/etc/php/5.4 --with-config-file-scan-dir=/usr/local/etc/php/5.4/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-pcntl --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-bcmath --enable-calendar --with-zlib=/usr/local/Cellar/zlib/1.2.7 --with-ldap --with-ldap-sasl=/usr --with-xmlrpc --with-kerberos=/usr --with-xsl=/usr --with-curl=/usr/local/Cellar/curl/7.28.0 --with-gd --enable-gd-native-ttf --with-freet