This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Git Timetracker. Copyright Kevin van Zonneveld (kvz.io) | |
# License under MIT | |
# | |
# This file | |
# | |
# - can be run inside a git repository to get a list on what hours work took place (for billing) | |
# - takes 1 argument: since. It defaults to "2 months" | |
# | |
# Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = '2' | |
VAGRANT_MIN_VERSION = '1.3.4' | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Check Vagrant version | |
if Vagrant::VERSION < VAGRANT_MIN_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# optie 1: | |
# http://stackoverflow.com/questions/7283010/magento-database-transaction | |
# | |
$transaction = Mage::getSingleton('core/resource')->getConnection('core_write'); | |
try { | |
$transaction->beginTransaction(); | |
// Make saves and other actions that affect the database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# This script is intended to preprocess a knife ec2 server create command and | |
# generate a user_data script in the /tmp folder that will rename the host | |
# to match whatever the node name is before the chef bootstrapping process | |
# begins. It then splits the knife command in front of the --node-name or -N | |
# options and inserts "--user-data /tmp/server-01.userdata" (in the example | |
# below) and execs the command. | |
# | |
# Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cfg = array( | |
'server' => 'mongodb://127.0.0.1:27017/?journal=false&w=1&wTimeoutMS=20000', | |
'db' => 'cm_cache', | |
'collection' => 'cm_cache' | |
); | |
// set to timezone to UTC, like magento do this | |
date_default_timezone_set('UTC'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
umask(0); | |
ini_set('memory_limit','512M'); | |
set_time_limit(0); | |
if(file_exists('app/Mage.php')) require 'app/Mage.php'; | |
else require '../../app/Mage.php'; | |
// Init without cache so we get a fresh version | |
Mage::app('admin','store', array('global_ban_use_cache' => TRUE)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# original file: https://gist.github.com/Rud5G/623d417209c237944186 | |
# create in /etc/sysctl.d/ | |
fs.inotify.max_user_watches = 100000 | |
~ | |
~ | |
~ | |
~ | |
~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class EmailTestCase extends PHPUnit_Framework_TestCase { | |
/** | |
* @var \Guzzle\Http\Client | |
*/ | |
private $mailcatcher; | |
public function setUp() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class EmailTestCase extends PHPUnit_Framework_TestCase { | |
/** | |
* @var \Guzzle\Http\Client | |
*/ | |
private $mailcatcher; | |
public function setUp() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class EmailTestCase extends PHPUnit_Framework_TestCase { | |
/** | |
* @var \Guzzle\Http\Client | |
*/ | |
private $mailcatcher; | |
public function setUp() |
OlderNewer