Skip to content

Instantly share code, notes, and snippets.

View dakira's full-sized avatar

Matthias Niess dakira

  • Germany
View GitHub Profile
dakira / fraud-cron.php
Last active December 21, 2015 12:49
cronjob to fix magento orders marked as fraudulent because of paypal rounding error
* cronjob to fix ridiculous rounding bug with paypal
* @Author fabian krueger
* use this script on your risk!
* - modified to use SOAP-API, needs SOAP user with admin rights
* - needs to live in mage installation folder
dakira /
Last active October 25, 2019 09:55
Creates a user with limited rights that has all their data removed on every login/logout/reboot utilizing aufs
# This script
# - creates a user (named below)
# - sets up a union (aufs) filesystem on top of the users immutable home
# - creates a cleanup script (/usr/local/bin/ that empties the aufs
# layer on login/logout/boot
# - replaces the lightdm config
# - replaces rc.local to run the script
dakira / cellphone.ino
Created September 2, 2014 12:40
cellphone with sms parser to run actions
(C) Copyright 2012-2013 Massachusetts Institute of Technology
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
dakira / magento.conf
Created September 17, 2014 12:51
magento nginx conf
server {
root /home/daim2k5/www/magento19.localhost;
index index.php;
server_name magento19.localhost;
location / {
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
location ^~ /(app|includes|lib|media/downloadable|pkginfo|report/config.xml|var)/ { internal; }
dakira / gist:135f0ca7c86e38a5cf18
Last active August 29, 2015 14:08
Magento: Activate products in the future
Follow these steps to create this functionality:
1. Create a custom date attribute, lets call it ‘activation_date’
2. Create a cron job that should implement the following:
2.1 Retrieve all product ids that were not activated (E.G. status disabled) and their activation date
is lower than current date
2.2 Activate all these products by the product attribute mass-action model:
dakira / gist:134bbebd0298791d9e55
Last active October 25, 2019 08:23
unattended upgrade configuration

needed packages: update-notifier-common unattended-upgrades


APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";
dakira /
Last active August 29, 2015 14:18
homstead script to run after provisioning
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
if [ ! -f /usr/local/extra_homestead_software_installed ]; then
apt-get -y install zsh joe-jupp
git clone git:// /home/vagrant/.oh-my-zsh
# MIGRATE MySQL4 DATABASES TO MySQL5 - Steps for dumping and converting
# Uses mysqldump and patches output to be compatible with MySQL 5.5+ (? - no sure
# at which specific release of MySQL 5 the old style syntax support ended).
# Conversion is most likely incomplete. It does some essential converting where
# I regularly experienced problems during migration.
# Use on own risk, always try with test databases first. No warranty at all!
dakira /
Last active September 6, 2017 16:59
Basic provisioning for Ubuntu 16.04
apt update && apt -y full-upgrade
apt-get install -y joe-jupp mosh byobu software-properties-common \
php7.0-intl php7.0-ldap php7.0-mcrypt php7.0-zip php7.0-soap \
python-setuptools python-simplejson python-imaging python-mysqldb python-flup \
language-pack-de language-pack-en
update-locale LANG=de_DE.UTF-8 LC_MESSAGES=POSIX

Keybase proof

I hereby claim:

  • I am dakira on github.
  • I am mniess ( on keybase.
  • I have a public key ASBAaZEJcvp5Oumr0JV6tVTaJIR18BbnLCXXIh7kbr4TaAo

To claim this, I am signing this object: