Skip to content

Instantly share code, notes, and snippets.

View damienwebdev's full-sized avatar
💻
Working on Daffodil @graycoreio

Damien Retzinger damienwebdev

💻
Working on Daffodil @graycoreio
View GitHub Profile
var a = [{
id: 1
}, {
id: 2
}];
var b = [{
id: 1
}, {
id: 2
gulp.task("webpack-dev-server", function() {
// modify some webpack config options
var myConfig = Object.create(webpackConfig);
// Start a webpack-dev-server
new WebpackDevServer(webpack(myConfig),{
contentBase: 'build',
inline:true
})
.listen(8080, "localhost", function(err) {
public function __construct(App $app, $api_key = null)
{
$this->app = $app;
$this->api_key = $api_key;
}
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Description;
import { connect } from 'react-redux'
import { toggleChoice } from '../actions/index'
import ChoiceSet from '../components/ChoiceSet';
const getChoices = (choices, choiceType) => {
return choices.filter(t => t.choiceType == choiceType)
};
const mapStateToProps = (state) => {
return {
import React from 'react';
import ReactDOM from 'react-dom'
import Todo from 'Todo';
export const TodoList = ({todos, onTodoClick}) => (
<ul>
{todos.map(todo => <Todo key={todo.id} {...todo} onClick={() => onTodoClick(todo.id)} />)}
</ul>
);
[
'a.b.c'
'a.b.d',
'a.q.z',
]
To something like...
[
'a' => [
Object {
1: Object,
3: Object,
5: Object,
9: Object
}
<?php
public function createObjectWithRelations($data){
$parent->create($data['parent']);
foreach($data['children' as $children){
$item = Mage::getModel('namespace/item');
$item->setData('stuff');
$item->parent_id = $parent->id
$item->save()
}
<block type="ext/adminhtml_ext_view_tabs" name="ext_tabs">
<block type="ext/adminhtml_ext_view_tab_info" name="ext_tab_info" template="ext/view/tab/info.phtml">
<block type="ext/adminhtml_ext_view_info" name="ext_info" template="ext/view/info.phtml"/>
</block>
</block>