- Create a new v-host directive /etc/apache2/sites-available
- Add the site to /etc/hosts
- Enable the site with
sudo a2ensite mysite.com
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
http://www.kaffeetalk.de/how-to-setup-and-configure-mysql-with-unixodbc-under-ubuntu-14-04/ |
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
wrote this up here a bit ago. See step 13. The rest of it may be useful to others as well: | |
https://laracasts.com/discuss/channels/general-discussion/homestead-with-php7 | |
The tl;dr is that you need to edit your nginx config. | |
sudo nano /etc/ngingx/sites-enabled/whatever-you-call-your-app.com and change: | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
To |
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
MySql should be fine after the update. | |
Your apache config will be overwritten but the old previous will still be there as httpd.conf~previous and httpd.conf.pre-update. | |
Using httpd.conf~previous worked for me. |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
elem.clientLeft
,elem.clientTop
,elem.clientWidth
,elem.clientHeight
elem.getClientRects()
,elem.getBoundingClientRect()
This document will outline a proposal for a service platform (API) and a repository pattern as a business layer for IC.
- Have a data layer that is independent of models and controllers.
- Have repo methods that can be consumed from other parts of the web application and from the command line.
- Reduce logic in controllers and models, allowing controllers to focus on HTTP level work (request data, cookies, responses) and models to focus on creating relationships, casting columns, mutators, etc. The controllers should instead delegate work to the repos.
- Repository methods can be reused by different parts of the web application and to perform work for an API request coming from outside (i.e. if we use a mobile platform like React Native it can call the API endpoints which in turn consume the repositories)
- Have repo methods be easily unit tested as they will not be accessing session data, request data or external constants. They only
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
def ecdf(data): | |
"""Compute ECDF for a one-dimensional array of measurements.""" | |
# Number of data points: n | |
n = len(data) | |
# x-data for the ECDF: x | |
x = np.sort(data) | |
# y-data for the ECDF: y |
Here are the installation steps on Ubuntu (this installation will also work on any Debian-based distribution):
- Open a terminal window.
- Issue the command sudo apt-get install postgresql.
- Type the sudo password necessary to give you admin rights and hit Enter.
- Allow apt to pick up any necessary dependencies.
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 | |
namespace App\Events; | |
use Illuminate\Contracts\Broadcasting\ShouldBroadcast; | |
use Illuminate\Queue\SerializesModels; | |
class NewMessage extends Event implements ShouldBroadcast | |
{ | |
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
/* right click on an entry in the network log, select Copy All as Har | |
* type in console: x = [paste] | |
* paste the following JS code into the console | |
* copy the output, paste into a file | |
* then wget -i [that file] | |
*/ | |
(function(logObj, mime) { | |
var results = []; | |
logObj.log.entries.forEach(function (entry) { | |
if (mime && entry.response.content.mimeType !== mime) return; |