Improving heat management after macbookpro 2011 discrete GPU fix, also a script to automate part of the fix process
Taken from StackExchange
Thanks to LangLangC
Taken from StackExchange
Thanks to LangLangC
Translations: Korean (by Yongwoo Lee)
Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.
I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
<?php | |
namespace App\Events; | |
use Illuminate\Contracts\Broadcasting\ShouldBroadcast; | |
use Illuminate\Queue\SerializesModels; | |
class NewMessage extends Event implements ShouldBroadcast | |
{ | |
// @flow | |
// Flow Fundamentals For ReactJS Developers | |
/* | |
Tutorial for ReactJS Developers wanting to get started with FlowType. | |
We will go through the basic Flow features to gain a better understanding of how to use FlowType with React. | |
You can uncomment the features one by one and work through this tutorial. | |
If you want to learn the very FlowType basics, refer to "Flow Fundamentals for JavaScript Developers" (https://gist.github.com/busypeoples/61e83a1becc9ee9d498e0db324fc641b) first. |
<!-- | |
Install dependencies with Bower: | |
bower install PolymerElements/paper-elements#^1.0.7 | |
--> | |
<html> | |
<head> | |
<title>Auth Example</title> | |
<link rel="shortcut icon" href="/favicon.png" type="image/x-icon"> |
const walk = require('babylon-walk'); | |
const babylon = require('babylon'); | |
const glob = require('glob'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const zip = (a, b, fn) => a.forEach((el, i) => fn(el, b[i], i)); | |
const promisify = fn => new Promise((res, rej) => { | |
const done = (err, val) => (err ? rej(err) : res(val)); |
mkdir -p generated | |
sips -Z 29 --out generated/iPhoneSettings-29x29.png sourceIcon.png | |
sips -Z 58 --out generated/[email protected] sourceIcon.png | |
sips -Z 80 --out generated/[email protected] sourceIcon.png | |
sips -Z 120 --out generated/[email protected] sourceIcon.png | |
sips -Z 29 --out generated/iPadSettings-29x29.png sourceIcon.png | |
sips -Z 58 --out generated/[email protected] sourceIcon.png | |
sips -Z 40 --out generated/iPadSpotlight-40x40.png sourceIcon.png |
In the default React Native app scaffolding you have to edit AppDelegate.m
to change where it loads the code if you want to test on your device. I use the following snippet to detect if it's being compiled for Debug or Production and for the Simulator or a device. For Production it uses a copy of the code included in the bundle, for Debug on the simualtor it loads from a server on localhost and for Debug on a device it loads from a server on a given IP address.
NOTE: You need to edit YOUR-IP-HERE and change it to the IP to load the code from when in Debug mode on a device. You could use a service like ngrok to make this work from anywhere.
NSURL *jsCodeLocation;
// Loading JavaScript code
#if DEBUG
// For Debug build load from development server. Start the server from the repository root: