Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthias Gutjahr mattsches

View GitHub Profile
@unixweb
unixweb / benzinpreis-info.json
Created Sep 3, 2018
Benzinpreis Info mit clever-tanken.de
View benzinpreis-info.json
[{"id":"de7f592f.426b4","type":"tab","label":"benzinpreise","disabled":false,"info":""},{"id":"17602fbb.76d9e","type":"html","z":"de7f592f.426b4","name":"","property":"payload","tag":"span","ret":"text","as":"single","x":610,"y":220,"wires":[["d073b7f3.18f4e","60def84f.1b22d"]]},{"id":"90a570f5.03e88","type":"inject","z":"de7f592f.426b4","name":"","topic":"tank1","payload":"","payloadType":"date","repeat":"","crontab":"00 12 * * *","once":false,"onceDelay":0.1,"x":150,"y":220,"wires":[["b2894f43.dcb4e8"]]},{"id":"b2894f43.dcb4e8","type":"http request","z":"de7f592f.426b4","name":"Bavaria Petrol - Munich","method":"GET","ret":"txt","url":"https://www.clever-tanken.de/tankstelle_details/33072","tls":"","x":390,"y":220,"wires":[["17602fbb.76d9e"]]},{"id":"d073b7f3.18f4e","type":"function","z":"de7f592f.426b4","name":"Parse Value","func":"msg.payload = msg.payload[38];\nreturn msg;","outputs":1,"noerr":0,"x":790,"y":220,"wires":[["9c0741c7.a33d58","8874821d.3c10b8"]]},{"id":"c1b8c77f.44295","type":"googlehome-no
@MaZderMind
MaZderMind / gist:f03298fa38f456c8ca6f32f269f5d12d
Last active May 4, 2017
Was hab ich eigentlich heute getan (git)
View gist:f03298fa38f456c8ca6f32f269f5d12d
~/C/foobar $ git config --global alias.today "log --pretty=format:'%ad - %s' --date=format:'%H:%M:%S' --author-date-order --reverse --all --since=7:00 --author=`whoami`"
~/C/foobar $ git today
11:39:51 - FOOBAR-137: Gestaltung des Backend-Editors
11:52:50 - FOOBAR-137: Anzeigenamen-Suffix konfigurierbar machen
11:59:10 - FOOBAR-42: ermögliche das Abbrechen des Anlegen eines Dingsbums
View starfield.php
<?php
use UI\App;
use UI\Window;
use UI\Point;
use UI\Size;
use UI\Area;
use UI\Controls\Box;
use UI\Draw\Pen;
use UI\Draw\Brush;
use UI\Draw\Path;
@mikecrittenden
mikecrittenden / ExampleModuleController.php
Last active Jun 17, 2021
Example of overriding a route controller in Drupal 8
View ExampleModuleController.php
<?php
/**
* @file
* Contains \Drupal\example_module\Controller\ExampleModuleController.
*/
// THIS FILE BELONGS AT /example_module/src/Controller/ExampleModuleController.php
namespace Drupal\example_module\Controller;
@shuairan
shuairan / install_taiga_uberspace.md
Last active Aug 14, 2019
Taiga.io Backend und Frontend auf Uberspace installieren
View install_taiga_uberspace.md
@dennisfrank
dennisfrank / get_remote_db.sh
Created May 23, 2014
Shell script to import a remote database into local environment
View get_remote_db.sh
#!/bin/sh
# Import a remote database into a local database
# ----------------------------------------------
#
# Based on http://danherd.net/quick-script-synchronise-from-a-remote-expressionengine-database/
#
# Don’t forget chmod +x to make the script executable.
#
# Change the extension to .command to run the script directly from OS X Finder.
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active Feb 4, 2021
A unit testing framework in a tweet.
View TestFrameworkInATweet.php
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
View damazon.py
#!/usr/bin/python
# setup: pip install requests beautifulsoup4
from decimal import Decimal
import requests
from bs4 import BeautifulSoup
import sys
import getpass
@lstrojny
lstrojny / app--code--local--Varien--Autoload.php
Created Apr 16, 2013
Replace Magento autoloader with composer based autoloader. Note: you are losing the ability to use the compiler.
View app--code--local--Varien--Autoload.php
<?php
/**
* Classes source autoload
*/
class Varien_Autoload
{
/** @var \Composer\Autoload\ClassLoader */
private static $autoloader;
/** @var self */
@kriswallsmith
kriswallsmith / QSAListener.php
Created Aug 8, 2012
implements QSA on Symfony2 redirects
View QSAListener.php
<?php
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
/** @DI\Service */
class QSAListener
{
private $blacklist;