Skip to content

Instantly share code, notes, and snippets.

View sagikazarmark's full-sized avatar

Márk Sági-Kazár sagikazarmark

View GitHub Profile
#!/usr/bin/python
# -*- coding: UTF-8 -*-
from gi.repository import Gio
import sys
import appindicator
import gtk
class Screensaver:
def __init__(self):
@sagikazarmark
sagikazarmark / Emitter
Last active August 29, 2015 14:07
Event Interop Interfaces
# Emitter/Dispatcher
This object is responsible for emitting/dispatching events to the listeners.
An Emitter can:
* Add listeners to the stack
* Return listeners (all, or the ones for a specific event)
* Remove listeners
* Emit an event
@sagikazarmark
sagikazarmark / task.php
Created October 19, 2014 10:12
Task example
<?php
class Task implements TaskInterface
{
public function run()
{
// ... some basic logic
// emit is just an example, the command logic is important here
$result = $this->emit(new InputCommand('Please give me some input!'));
@sagikazarmark
sagikazarmark / ObjectStorageTest.php
Created January 2, 2015 11:02
Tests that the object storage dereferences objects stored
<?php
class foo
{
public function __destruct()
{
echo 'Destructor called';
}
}
@sagikazarmark
sagikazarmark / SomeServiceProvider.php
Created January 30, 2015 11:17
Generic service provider
<?php
class SomeServiceProvider
{
public $provides = array(
'service',
'service.one',
'service.two',
);
@sagikazarmark
sagikazarmark / DbadException.php
Created January 30, 2015 13:36
In cases when your code is clearly not used for what it should be
<?php
/**
* DBAD exception
*
* @link http://www.dbad-license.org/
*/
class DbadException extends \Exception
{
@sagikazarmark
sagikazarmark / package.gulp.json
Last active August 29, 2015 14:27
How not to use bower/grunt/gulp at all?
{
"private": true,
"devDependencies": {
"bootstrap": "3.3.5",
"bootswatch": "3.3.5",
"browser-sync": "^2.8.0",
"browserify": "^11.0.0",
"del": "^1.1.1",
"domready": "^1.0.8",
"font-awesome": "4.3",
Verifying that +sagikazarmark is my blockchain ID. https://onename.com/sagikazarmark
@sagikazarmark
sagikazarmark / ideas.md
Created March 18, 2016 22:01
Blog ideas

Blog ideas

I am going to start a new blog soon. The specialty will be that it will be dual language: English and Hungarian.

Nowadays writting in English is the standard in IT. However, I would like to promote development in my country as well, so every or most of my articles will be translated to both languages.

My ideas so far:

  • Introduction
@sagikazarmark
sagikazarmark / sitemap_generators.md
Created October 13, 2015 21:58
List of currently available sitemap generators (and why they should be avoided)