acme.sh --install-cert -d example.com --key-file /etc/nginx/ssl/example.com/privkey.pem --fullchain-file /etc/nginx/ssl/example.com/fullchain.pem --reloadcmd 'service nginx force-reload' --accountemail you@example.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
#!/usr/bin/env bash | |
runApp() { | |
MY_PATH=$(dirname "$0") | |
MY_PATH=$( (cd "$MY_PATH" && pwd)) | |
APP_PATH="${MY_PATH}" | |
export alpas_run_mode="console" | |
export alpas_root_dir="$APP_PATH" |
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 | |
# current Git branch | |
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
# v1.0.0, v1.5.2, etc. | |
versionLabel=v$1 | |
# establish branch and tag name variables | |
devBranch=develop |
Follow the steps below to install Team City on Ubuntu with Nginx as the proxy for port 80.
Install Team City:
# will install on port 8111
sudo wget -c https://gist.githubusercontent.com/ashokgelal/2cace34ae3147834042c80fa4538976f/raw/teamcity-install.sh -O /tmp/teamcity-install.sh
Laravel-Mix is "an elegant wrapper around Webpack for the 80% use case". It has nothing to do with Elixir's Mix and does not require Laravel to work!
Create a new phoenix application with mix phx.new
. You may choose to add the --no-brunch
flag to stop brunch from being intiailized, but I personally prefer leaving that in and replacing brunch so that the folder structure is set up for me.
$ mix phx.new demo
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
@servers([ 'remote' => 'server.example.com', ]) | |
@setup | |
if ( ! isset($repo) ) | |
{ | |
throw new Exception('--repo must be specified'); | |
} | |
if ( ! isset($base_dir) ) | |
{ |
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 App\Permission; | |
use Illuminate\Database\Seeder; | |
use Spatie\Permission\Models\Role; | |
class TenantDatabaseSeeder extends Seeder | |
{ | |
public function run() | |
{ |
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; | |
use Hyn\Tenancy\Traits\UsesTenantConnection; | |
use Spatie\Permission\Models\Role as BaseRole; | |
class Role extends BaseRole | |
{ | |
use UsesTenantConnection; |
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\Console\Commands; | |
use Hyn\Tenancy\Contracts\Repositories\CustomerRepository; | |
use Hyn\Tenancy\Contracts\Repositories\HostnameRepository; | |
use Hyn\Tenancy\Contracts\Repositories\WebsiteRepository; | |
use Hyn\Tenancy\Environment; | |
use Hyn\Tenancy\Models\Customer; | |
use Illuminate\Console\Command; |
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
// add a new new key in config/app.php: | |
‘url_base’ => env(‘APP_URL_BASE’, ‘http://localhost'), | |
// modify your .env file: | |
APP_URL_BASE=townhouse.dev | |
APP_URL=http://${APP_URL_BASE} |
NewerOlder