For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');| moved to github --> https://github.com/bill-auger/git-branch-status/ |
| // Lists of countries with ISO 3166 codes, presented in various formats. | |
| // Last Updated: July 30, 2020 | |
| // If you're using PHP, I suggest checking out: | |
| // https://github.com/thephpleague/iso3166 | |
| // or Laravel: https://github.com/squirephp/squire | |
| // | |
| // JS developers can check out: | |
| // https://www.npmjs.com/package/iso3166-2-db | |
| // |
| #!/bin/sh | |
| OPTIONS=`vagrant ssh-config | awk -v ORS=' ' '{print "-o " $1 "=" $2}'` | |
| scp ${OPTIONS} "$@" || echo "Transfer failed. Did you use 'default:' as the target?" |
| # Create a new Token | |
| curl -u 'githubuser' -d '{"note":"Your Application"}' https://api.github.com/authorizations | |
| # It is: "ebab4dc37e654bb230a9c69ebcd5f38e9a81e210" | |
| #{ | |
| # "created_at": "2013-01-04T18:00:28Z", | |
| # "app": { | |
| # "url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api", |
| # Add the following 'help' target to your Makefile | |
| # And add help text after each target name starting with '\#\#' | |
| help: ## Show this help. | |
| @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
| # Everything below is an example | |
| target00: ## This message will show up when typing 'make help' | |
| @echo does nothing |
For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');| #!/usr/bin/env bash | |
| softwareupdate -l | |
| while true; do | |
| echo "Do you wish to update all the above things?" | |
| read -p "[y/n]? " yn | |
| case $yn in | |
| [Yy]* ) softwareupdate -i -a; break;; | |
| [Nn]* ) exit;; |
⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates
What this will cover
www.website.com to website.comindex.html)| # NOTE | |
| # | |
| # | |
| # Use sed on the instance up to replace the INSTANCE_ID and DNS_RESOLVER with the following commands | |
| # | |
| #################################################################################################### | |
| # Fetch the private IP for resolving DNS dynamically in nginx | |
| # We also need to escape the `.` from it for usage in later sed | |
| # | |
| # DNS_RESOLVER=`grep nameserver /etc/resolv.conf | cut -d " " -f2 | sed 's/\./\\./g'` |
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" |