Skip to content

Instantly share code, notes, and snippets.

View Thinkscape's full-sized avatar

Arthur Bodera Thinkscape

View GitHub Profile
@Thinkscape
Thinkscape / gist:a9f96d9ecffeb6ba9f4f
Last active August 29, 2015 14:27
Mixcloud onboarding genres 08.2015
--- duplicity 2015-08-19 12:00:48.000000000 +0200
+++ duplicity 2015-08-19 12:00:43.000000000 +0200
@@ -158,7 +158,8 @@
# there is no sign_key and there are recipients
elif (action == "full"
and (globals.gpg_profile.recipients or globals.gpg_profile.hidden_recipients)
- and not globals.gpg_profile.sign_key):
+ and not globals.gpg_profile.sign_key
+ and not globals.restart):
return ""
@Thinkscape
Thinkscape / Debug.php
Created August 26, 2011 05:58
ZF2 Front Controller Debugger plugin
<?php
namespace Zend\Controller\Plugin;
use Zend\Controller;
use Zend\Controller\Request;
use Zend\Controller\Plugin\AbstractPlugin;
class Debug extends AbstractPlugin
{
protected $_logger;
---------- PROPOSAL 1 --------------------
* directory names in plural form
* assets grouped by purpose
------------------------------------------
/application
/library
/Zend
/OtherVendor
/modules
/Statistics
@Thinkscape
Thinkscape / gist:1217418
Created September 14, 2011 18:50
ZF2 IRC Meeting 2011-09-14
[Zend Framework 2.0 IRC Meeting channel. Next meeting: 2011-09-14 17:00 UTC; agenda: http://bit.ly/rimSDJ. Previous meeting minutes: http://bit.ly/oQ60Xm]
[18:55] * Thinkscape : meeting starts in 5 minutes
[18:56] == rdohms [~rdohms@201.23.78.250.dedicated.neoviatelecom.com.br]
[18:56] == realname : Rafael Dohms
[18:56] == channels : #zf2-meeting #zftalk.dev
[18:56] == server : adams.freenode.net [Budapest, HU, EU]
[18:56] == account : rdohms
[18:56] == End of WHOIS
[18:56] <Akrabat> I have dinner in 5 minutes :)
[18:58] <weierophinney> starting in 2 or 3 minutes...
@Thinkscape
Thinkscape / gist:1415354
Created December 1, 2011 09:35
Discussion on usage of constants in ZF2 application configuration
[19:22] <EvanDotPro> :) no rush
[19:27] <Thinkscape> So ... I feel like in this discussion on using constants inside config files, there are literaly 2 constants we're talking about: APPLICATION_ENV and APPLICATION_PATH. These are most important ones.
[19:28] <Thinkscape> But.... with recent changes in ZF2 core, APPLICATION_ENV is reflected with different config files being loaded --- so it's irrelevant
[19:28] <Thinkscape> APPLICATION_PATH on the other hand does not make any sense, as we do not use application path...
[19:28] <Thinkscape> there is no application/ dir per se, as modules go into modules/, vendor into vendor/ and config into config/
[19:29] <Thinkscape> So by definition --- path definitions should be >RELATIVE<
[19:29] <Thinkscape> For example: modules.somemodulewithsqlite.sqlite.params.file = "data/db.sqlite"
[19:29] <Thinkscape> Which means: ./data/db.sqlite
[19:29] <Thinkscape> Absolute paths should be prepended with a slash:
[19:30] <Thinkscape> modules.somemodulewithsqlite.sqlite.params.fi
@Thinkscape
Thinkscape / gist:1772600
Created February 8, 2012 19:26
Conceptual description of zf2 AssetManager event-driven inter-module workflow
1) AssetManager module init(): register "resources.collectPath" event with Mod.Manager
2) Other modules' init(): attach listener to "resources.collectPath"
3) Application runs...
4) $this->locator->assetManager->injectCSS();
5) AssetManager: $events->trigger("resources.collectPath").
6) listeners in modules do: $r = $event->getTarget(); $r[] = __DIR__ .'/css/main.css"
7) AssetManager: receives a whole collection of paths
8) AssetManager: merge, minify, output
@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