Skip to content

Instantly share code, notes, and snippets.

<?php
function getSourceData() {
$iterator = [
["one"=> 1, "two" => 2, "thre" => 3],
["one"=> 11, "two" => 12, "thre" => 13]
];
$itemSelector = "content/image/filePath";
foreach ($iterator as $row) {
$source_data[] = $row;
}
@blex18
blex18 / index.js
Created May 4, 2021 09:07
SO_67375281
const mongoose = require('mongoose');
const moment = require('moment');
const Schema = mongoose.Schema;
const user = process.env.SO_USER;
const pass = process.env.SO_PASS;
const uri = process.env.SO_URI;
const throng = require('throng')
{ e: 'request',
args:
[ Request {
_client: [Object],
_requestId: '1BDB79D0EC5FD3B81109C4691D771361',
_isNavigationRequest: true,
_interceptionId: null,
_allowInterception: false,
_interceptionHandled: false,
@blex18
blex18 / so.js
Created March 8, 2016 15:08
35863011
var page = require('webpage').create();
page.open('http://github.com/', function() {
page.render('/tmp/github.png');
phantom.exit();
});
@blex18
blex18 / Fluid.php
Created April 28, 2014 15:49
Many-to-many
<?php
namespace Foo\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Fluid
*
* @ORM\Table(name="fluids")