brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
<?php | |
/** | |
* @author Mirco Babini, SED Web Italia | |
* | |
* Contents: | |
* - reset payment method on 'add to cart' | |
* - add message to (customer) email per payment method | |
* - add payment method to email | |
* - remove product tabs | |
* - remove result count and default ordering (doesnt work?) |
Note: This setup assumes you are running Ubuntu 16.04 OS with Apache 2.4.23, older versions of Ubuntu (i.e. 14.04) require minor configuration changes in order for this setup to work.
Follow the install instructions for certbot
(letsencrypt's SSL manager) on https://certbot.eff.org/, making sure to select the correct server OS version.
Note: You only need to complete the Install
section, then return to this README in order to setup your SSL
{{ xml_header }} | |
<rss version="2.0"> | |
<channel> | |
{{ get_content from="/blog" }} | |
<title>{{ title | cdata }}</title> | |
<link>{{ site_url }}</link> | |
<description>{{ content | cdata }}</description> | |
{{ /get_content }} | |
<lastBuildDate>{{ collection:blog limit="1" }}{{ date format="r" }}{{ /collection:blog }}</lastBuildDate> | |
<language>en-us</language> |
Source: https://medium.com/@Mahmoud_Zalt/eloquent-relationships-cheat-sheet-5155498c209
One to one ( 1-1 ) |
One to many ( 1-n ) |
Poly one to many ( 1x-n ) |
Many to many ( n-n ) |
Poly many to many ( nx-n ) |
|
---|---|---|---|---|---|
Number of models | 2 only | 2 only | 3 and above | 2 only | 3 and above |
Number of tables | 2 (1/model) | 2 (1/model) | 3+ (1/model) | 3 (1/model + pivot) | 4+ (1/model + pivot) |
Pivot table | - | - | - | required |
// Quick and dirty Instagram scraper | |
private function scrape($username) | |
{ | |
$source = file_get_contents('http://instagram.com/' . $username); | |
$shards = explode('window._sharedData = ', $source); | |
$json_response = explode(';</script>', $shards[1]); | |
$response_array = json_decode($json_response[0], TRUE); | |
$nodes = array_get($response_array, 'entry_data:ProfilePage:0:user:media:nodes'); | |
$data = array(); |
if [ ! -f "/home/vagrant/.ssh/id_rsa" ]; then | |
ssh-keygen -t rsa -N "" -f /home/vagrant/.ssh/id_rsa | |
fi | |
cp /home/vagrant/.ssh/id_rsa.pub /vagrant/control.pub | |
cat << 'SSHEOF' > /home/vagrant/.ssh/config | |
Host * | |
StrictHostKeyChecking no | |
UserKnownHostsFile=/dev/null |
This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).
This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
title: 'Site Settings' | |
hide: true | |
sections: | |
main: | |
fields: | |
head_scripts: | |
mode: table | |
fields: | |
description: | |
type: text |