Skip to content

Instantly share code, notes, and snippets.

View marvinosswald's full-sized avatar

Marvin Oßwald marvinosswald

View GitHub Profile
<?php
return array(
'base_dir' => '.',
'archive_files' => 'build.tar',
'extension_name' => 'H2ODev_MagentoVLB',
'extension_version' => '0.0.1',
'skip_version_compare' => false,
'auto_detect_version' => false,
'path_output' => getenv('CIRCLE_ARTIFACTS'),
'stability' => 'beta',
@marvinosswald
marvinosswald / index.html
Created August 12, 2014 12:59
Emberjs nested child view example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="http://builds.emberjs.com/tags/v1.5.1/ember.min.js"></script>
<style id="jsbin-css">
@marvinosswald
marvinosswald / admin-modal
Created April 14, 2015 13:38
Can't access inputTitle from "submit" action
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">{{title}}</h4>
</div>
<div class="modal-body">
{{yield}}
</div>
<div class="modal-footer">
@marvinosswald
marvinosswald / gist:6d11c40fc1ae1e194d58
Created April 15, 2015 12:45
How to access a model assigned by the controller from an action
import Ember from "ember";
export default Ember.Route.extend({
setupController:function(controller){
if(sessionStorage.user){
var user = JSON.parse(sessionStorage.user);
if(!user){
this.transitionTo('login');
}else{
//way to go
import Ember from "ember";
export default Ember.Component.extend({
attributeBindings: ['id'],
id: 'calendar',
setEvents:function (){
console.log(this.get("theEvents"));
}.observes("theEvents"),
_initializeCalendar: function() {
var self = this;
@marvinosswald
marvinosswald / full-calendar.js
Last active August 29, 2015 14:19
Can't access jquery obj
import Ember from "ember";
export default Ember.Component.extend({
attributeBindings: ['id'],
id: 'calendar',
setEvents:function (){
var events = this.get("theEvents");
var arr = []
events.forEach(function(e,i,enumerable){
arr.push({
@marvinosswald
marvinosswald / gist:77e6465f31d6c4983895
Created June 5, 2015 10:10
Request / Response Safari and Firefox for shop-blank.de

Firefox

#Static Frontpage

Request

    Host: www.shop-blank.de
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: de,en-US;q=0.7,en;q=0.3

<session_save>db</session_save>
<redis_session> <!-- All options seen here are the defaults -->
<host>127.0.0.1</host> <!-- Specify an absolute path if using a unix socket -->
<port>6379</port>
<password></password> <!-- Specify if your Redis server requires authentication -->
<timeout>2.5</timeout> <!-- This is the Redis connection timeout, not the locking timeout -->
<persistent></persistent> <!-- Specify unique string to enable persistent connections. E.g.: sess-db0; bugs with phpredis and php-fpm are known: https://github.com/nicolasff/phpredis/issues/70 -->
<db>1</db> <!-- Redis database number; protection from accidental loss is improved by using a unique DB number for sessions -->
<compression_threshold>2048</compression_threshold> <!-- Set to 0 to disable compression (recommended when suhosin.session.encrypt=on); known bug w
[23-Jul-2015 15:45:07 UTC] PHP Fatal error: Call to a member function __toString() on a non-object in /vagrant/httpdocs/app/Mage.php on line 859
[23-Jul-2015 15:45:07 UTC] PHP Stack trace:
[23-Jul-2015 15:45:07 UTC] PHP 1. {main}() /vagrant/httpdocs/cron.php:0
[23-Jul-2015 15:45:07 UTC] PHP 2. Mage::dispatchEvent() /vagrant/httpdocs/cron.php:76
[23-Jul-2015 15:45:07 UTC] PHP 3. Mage_Core_Model_App->dispatchEvent() /vagrant/httpdocs/app/Mage.php:448
[23-Jul-2015 15:45:07 UTC] PHP 4. Mage_Core_Model_App->_callObserverMethod() /vagrant/httpdocs/app/code/core/Mage/Core/Model/App.php:1317
[23-Jul-2015 15:45:07 UTC] PHP 5. Aoe_Scheduler_Model_Observer->dispatch() /vagrant/httpdocs/app/code/core/Mage/Core/Model/App.php:1338
[23-Jul-2015 15:45:07 UTC] PHP 6. Aoe_Scheduler_Model_Schedule->process() /vagrant/httpdocs/.modman/Aoe_Scheduler/app/code/community/Aoe/Scheduler/Model/Observer.php:39
[23-Jul-2015 15:45:07 UTC] PHP 7. Aoe_Scheduler_Model_Schedule->runNow() /vagrant/httpdocs/.modman/Aoe_Scheduler/
$body = "Unable to upload Order: " . $orderId;
$mail = new Zend_Mail();
$mail->setBodyText($body);
$mail->setFrom($fromEmail, $fromName);
$mail->addTo($toEmail, $toName);
$mail->setSubject($subject);