Skip to content

Instantly share code, notes, and snippets.

@dennisfrank
dennisfrank / get_remote_db.sh
Created May 23, 2014 16:49
Shell script to import a remote database into local environment
#!/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.
@kriswallsmith
kriswallsmith / QSAListener.php
Created August 8, 2012 18:23
implements QSA on Symfony2 redirects
<?php
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
/** @DI\Service */
class QSAListener
{
private $blacklist;
@trehn
trehn / damazon.py
Last active November 22, 2016 08:47 — forked from zakx/damazon.py
#!/usr/bin/python
# setup: pip install requests beautifulsoup4
from decimal import Decimal
import requests
from bs4 import BeautifulSoup
import sys
import getpass
<?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;
@MaZderMind
MaZderMind / gist:f03298fa38f456c8ca6f32f269f5d12d
Last active May 4, 2017 13:28
Was hab ich eigentlich heute getan (git)
~/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
@lstrojny
lstrojny / app--code--local--Varien--Autoload.php
Created April 16, 2013 11:27
Replace Magento autoloader with composer based autoloader. Note: you are losing the ability to use the compiler.
<?php
/**
* Classes source autoload
*/
class Varien_Autoload
{
/** @var \Composer\Autoload\ClassLoader */
private static $autoloader;
/** @var self */
@nzjrs
nzjrs / skype-notify.py
Created June 3, 2011 13:14
Python script to make Skype co-operate with GNOME3 notifications
#!/usr/bin/env python
# Python script to make Skype co-operate with GNOME3 notifications.
#
#
# Copyright (c) 2011, John Stowers
#
# Adapted from skype-notify.py
# Copyright (c) 2009, Lightbreeze
#
#
@crittermike
crittermike / ExampleModuleController.php
Last active June 17, 2021 12:55
Example of overriding a route controller in Drupal 8
<?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 July 28, 2021 12:58
Taiga.io Backend und Frontend auf Uberspace installieren
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active May 23, 2022 12:28
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}