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
variable "do_token" {} | |
variable "pub_key" {} | |
variable "pvt_key" {} | |
variable "ssh_fingerprint" {} | |
provider "digitalocean" { | |
token = "${var.do_token}" | |
} |
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
#!/bin/bash | |
# This script acts as a wrapper to Terraform. | |
# Is Terraform available? | |
hash terraform 2>/dev/null || { echo >&2 "I require Terraform but it's not installed or in your path. Aborting."; exit 1; } | |
# All of the args are mandatory. | |
if [ $# -lt 3 ]; then | |
echo "Incorrect usage." | |
echo "$ ./tf-wrapper.sh plan production ami-XXXYYYZZ" |
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
[user] | |
name = Oskar Szrajer | |
email = oskarszrajer@gmail.com | |
[alias] | |
br = branch | |
co = checkout | |
ci = commit | |
df = diff | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit |
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
public function change() | |
{ | |
$table = $this->table('continents', array('id' => false, 'primary_key' => array('name', 'country_id'))); | |
$table->addColumn('name', 'string') | |
->addColumn('country_id', 'integer') | |
->addForeignKey('country_id', 'country', 'country_id', $options = array()) | |
->save(); | |
} |
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 | |
use Phinx\Migration\AbstractMigration; | |
class CreatePostsTable extends AbstractMigration | |
{ | |
/** | |
* Migrate Up. | |
*/ | |
public function up() |
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 | |
use Phinx\Migration\AbstractMigration; | |
class ExampleMigration extends AbstractMigration | |
{ | |
/** | |
* Change Method. | |
* | |
* More information on this method is available here: |
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 | |
use Phinx\Migration\AbstractMigration; | |
class CreateUserTable extends AbstractMigration | |
{ | |
public function change() | |
{ | |
$users = $this->table('users'); | |
$users->addColumn('username', 'string', array('limit' => 20)) |
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
{ | |
"require": { | |
"robmorgan/phinx": "*" | |
} | |
} |
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 | |
use Phinx\Migration\AbstractMigration; | |
class CreatePostsTable extends AbstractMigration | |
{ | |
/** | |
* Migrate Up. | |
*/ | |
public function up() |
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
/usr/local/etc isn't writable. | |
This can happen if you "sudo make install" software that isn't managed | |
by Homebrew. | |
If a brew tries to write a file to this folder, the install will\nfail during the link step. | |
You should probably `chown` /usr/local/etc | |
Some folders in /usr/local/share/locale aren't writable. | |
This can happen if you "sudo make install" software that isn't managed |
NewerOlder