Comments for 12 Devs of Xmas http://OFFLINEZIP.wpsho 12 insightful articles introducing you to new and exciting thoughts and ideas in the world of web development Mon, 11 Jun 2018 07:21:34 +0000 hourly 1 https://wordpress.org/?v=4.7.2 Comment on Day 4: Mixing and Matching PHP Components with Composer by Antonis Chatzikonstantis http://OFFLINEZIP.wpsho2012/12/day-4-mixing-and-matching-php-components-with-composer/#comment-24592 Mon, 11 Jun 2018 07:21:34 +0000 http://OFFLINEZIP.wpsho?p=163#comment-24592 In case someone wants to use multiple connections in Eloquent this is what I did in my dependencies file (for slim v3 and eloquent v5.6):

//setup Eloquent connection
$capsule = new \Illuminate\Database\Capsule\Manager;

//mysql
$capsule->addConnection($container->get(‘settings’)[‘mysql’], ‘mysql’);

//mssql
foreach ($container[‘settings’][‘mssql_connections’] as $connection_name => $connection_data) {
$capsule->addConnection($connection_data, $connection_name);
}

$capsule->setAsGlobal();
$capsule->bootEloquent();

$container[‘connections’] = $capsule;

Then in my models I set the connection I want them to use:

class MyModel extends Model
{
protected $connection = ‘mysql’;
}

In case I want to use the Query Builder:

$conn = $this->container[‘connections’]->getConnection(‘mysql’);

$conn->table(‘test’)->select(‘title’)->get();

Hope someone finds it helpful!

]]>
Comment on Day 9: Service Worker: Santa’s little performance helper by Peter http://OFFLINEZIP.wpsho2016/01/day-9-service-worker-santas-little-performance-helper/#comment-16752 Sun, 07 Jan 2018 15:41:20 +0000 http://OFFLINEZIP.wpsho?p=478#comment-16752 Thanks for the article Phil.
// Kick off the update request
const fetchPromise = fetch(request).then(function(fetchResponse) {
// Cache the updated file and then return the response
cache.put(request, fetchResponse.clone());
return fetchResponse;
}

How does assigning the promise kicks off the request, without even calling the function.. Please help…

]]>
Comment on Day 11: Nudge Theory: an introduction by David http://OFFLINEZIP.wpsho2017/01/day-11-nudge-theory-an-introduction/#comment-15298 Mon, 09 Oct 2017 17:31:59 +0000 http://OFFLINEZIP.wpsho?p=620#comment-15298 Great article!

]]>
Comment on Day 11: Creating your own Franken-butler with Hubot by Amit Gupta http://OFFLINEZIP.wpsho2014/01/day-11-creating-your-own-franken-butler-with-hubot/#comment-11917 Wed, 15 Feb 2017 14:21:04 +0000 http://OFFLINEZIP.wpsho?p=310#comment-11917 Thanks Rémy for the example. how can I use other js libraries like jquery or d3 in hubot?

]]>
Comment on Day 12: Beat ‘dis: Re-addressing Audio Analysis by Yannis http://OFFLINEZIP.wpsho2017/01/day-12-beat-dis-re-addressing-audio-analysis/#comment-11334 Sat, 14 Jan 2017 13:57:53 +0000 http://OFFLINEZIP.wpsho?p=661#comment-11334 I’m glad to see that others also recognize that music theory is the way to go for audio reactive visualizations. Hybrid systems that measure pure musical properties along with audio energy to pick up patterns. This is what prompted me to write clubber.js and the results are awesome. Here are some examples https://goo.gl/7tDFmr https://goo.gl/411PTg https://goo.gl/9yBZnJ https://wizgrav.github.io/clubber/ . You’re gonna love the tool

]]>
Comment on Day 2: Testing React Applications by vikas agartha http://OFFLINEZIP.wpsho2015/12/day-2-testing-react-applications/#comment-11312 Fri, 13 Jan 2017 15:32:56 +0000 http://OFFLINEZIP.wpsho?p=399#comment-11312 hey jack! i was brand new to unit testing in react, and your article got me up to speed in an afternoon.

i’ll be moving forward with tape + enzyme for my work.

questions:

1. a year later, would you recommend any modifications to your testing stack? anything you have learned which would have changed your writeup?

2. i work at a really small startup (2 devs right now). my co-worker recommended selenium for testing the ui. would it be overkill to use both tape/enzyme AND selenium? do react-addons-test-utils and enzyme replace selenium?

]]>
Comment on Day 4: Mixing and Matching PHP Components with Composer by Phil Sturgeon http://OFFLINEZIP.wpsho2012/12/day-4-mixing-and-matching-php-components-with-composer/#comment-11199 Tue, 03 Jan 2017 03:42:28 +0000 http://OFFLINEZIP.wpsho?p=163#comment-11199 Howdy folks! I had no idea people would be looking for updates years after this was written. Sorry it’s not lasted the test of time.

Capsule no longer exists, as the functionality was rolled into the Laravel database component, as one of their first attempts at making components easier to use outside of Laravel itself.

You can read more in the README of their GitHub Repo, as I don’t think the components are documented by themselves.

https://github.com/illuminate/database

Thanks!

]]>
Comment on Day 6: Lessons my students have taught me by Inua http://OFFLINEZIP.wpsho2016/12/day-6-lessons-my-students-have-taught-me/#comment-11189 Sun, 01 Jan 2017 18:51:50 +0000 http://OFFLINEZIP.wpsho?p=589#comment-11189 Awesome, great to meet you last year (lol) and this is inspiring to read! Happy New year!

]]>
Comment on Day 3: Crash Course in Creative SVG for Developers by Ben Fletcher http://OFFLINEZIP.wpsho2016/12/day-3-crash-course-in-creative-svg-for-developers/#comment-11150 Wed, 28 Dec 2016 23:09:36 +0000 http://OFFLINEZIP.wpsho?p=571#comment-11150 Great SVG possibilities & examples.

]]>
Comment on Day 9: Service Worker: Santa’s little performance helper by Glenn http://OFFLINEZIP.wpsho2016/01/day-9-service-worker-santas-little-performance-helper/#comment-11130 Mon, 26 Dec 2016 10:37:29 +0000 http://OFFLINEZIP.wpsho?p=478#comment-11130 Does the service worker cache the compressed or uncompressed form of files that are sent from the server as compressed?

]]>
Comment on Day 10: Maintaining a better workflow with Grunt by Suyog http://OFFLINEZIP.wpsho2014/01/day-10-maintaining-a-better-workflow-with-grunt/#comment-10558 Mon, 10 Oct 2016 10:15:11 +0000 http://OFFLINEZIP.wpsho?p=302#comment-10558 Hi,

Is it possible to keep ‘node_modules’ folder globally(like c:\etc.)and use in different project. I want to avoid the instance of ‘node_modules’ folder in every project directory for same type of task(grunt-contrib-cssmin and grunt-zip).

Thanks,
Suyog Shaha

]]>
Comment on Day 7: Surprising CSS properties you can use today by 【译】2016年至今最受欢迎的14篇CSS文章 | 神刀安全网 http://OFFLINEZIP.wpsho2016/01/day-7-surprising-css-properties-you-can-use-today/#comment-9866 Fri, 01 Jul 2016 16:58:27 +0000 http://OFFLINEZIP.wpsho?p=462#comment-9866 […] 8. Surprising CSS Properties You Can Use Today […]

]]>