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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
/** | |
* Cleanup images from Magento | |
*/ | |
require 'app/Mage.php'; | |
if (!Mage::isInstalled()) { | |
echo "Application is not installed yet, please complete install wizard first."; | |
exit; |
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
var React = require('react'); | |
module.exports = React.createClass({ | |
getInitialState: function () { | |
return { | |
battery: 0 | |
}; | |
}, | |
componentDidMount: function () { | |
navigator.getBattery().then( |
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
module.exports = { | |
entry: './src/js/app.jsx', | |
output: { | |
filename: 'public/[name].js' | |
}, | |
module: { | |
preLoaders: [ | |
{ test: /\.json$/, exclude: /node_modules/, loader: 'json'}, | |
], | |
loaders: [ |
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
# Sometimes is it is required to add logging of all guzzle requests into log file via Monolog | |
# You need to add https://github.com/guzzle/log-subscriber to your project | |
# app/config/config.yml | |
monolog: | |
channels: ["guzzle"] | |
handlers: | |
main: | |
channels: ["!guzzle"] |
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 | |
// Helper/Data.php | |
... | |
public function prepareIndexdata($index, $separator = ' ', $entity_id = NULL) | |
{ | |
$_attributes = array(); |