title: Setting Up Laravel in Ubuntu / DigitalOcean keywords: servers, laravel, coderstape, coder's tape description: Let's take a look at settting up a server from scratch for Laravel. date: April 1, 2019 tags: servers, laravel permalink: setting-up-laravel-in-ubuntu-digitalocean img: https://coderstape.com/storage/uploads/GZTXUbyGum2xeUZM9qBD5aPv8EKLwG3C8RGcRon4.jpeg author: Victor Gonzalez authorlink: https://github.com/vicgonvt
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
{% set someArrayToPaginate = [ | |
{someProperty:"One"}, | |
{someProperty:"Two"}, | |
{someProperty:"Three"}, | |
{someProperty:"Four"}, | |
{someProperty:"Five"}, | |
{someProperty:"Six"}, | |
{someProperty:"Seven"}, | |
{someProperty:"Eight"}, | |
{someProperty:"Nine"}, |
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
class EventCatcher | |
{ | |
/** | |
* @var array | |
*/ | |
protected $classConstants = []; | |
public function __invoke(yii\base\Event $event) | |
{ |
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 | |
$section = Craft::$app->sections->getSectionByHandle('journalArticles'); | |
$entryTypes = $section->getEntryTypes(); | |
$entryType = reset($entryTypes); | |
$entry = new Entry([ | |
'sectionId' => $section->id, | |
'typeId' => $entryType->id, | |
'fieldLayoutId' => $entryType->fieldLayoutId, |
- https://jwt.io/
- https://blog.pusher.com/build-rest-api-laravel-api-resources/
- https://stackoverflow.com/questions/33723033/single-sign-on-flow-using-jwt-for-cross-domain-authentication
- https://stackoverflow.com/questions/33900667/how-to-implement-logout-in-a-jwt-based-single-sign-on-authentication-architectur
- https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
- https://jcubic.wordpress.com/2014/06/20/cross-domain-localstorage/
- https://blog.zok.pw/web/2015/10/21/3rd-party-cookies-in-practice/
- https://gist.github.com/pbojinov/8965299
- https://stormpath.com/blog/where-to-store-your-jwts-cookies-vs-html5-web-storage
Bash by Examples
Linux Commands In Structured Order with Detailed Reference
Find Locate
Hold Option + Click: to move cursor to destination position
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 | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
apt-get install pkg-config libmagickwand-dev -y | |
cd /tmp | |
wget https://pecl.php.net/get/imagick-3.4.3.tgz | |
tar xvzf imagick-3.4.3.tgz |
Things I had to do using Homebrew to get my local web dev environment back up and running after migration to OSX Sierra + Xcode 8.1.
Note: I used brew reinstall
because I had already installed most of this previously under Yosemite. Probably better ways to do this, but this is what worked for me.
brew doctor
brew tap homebrew/dupes
brew tap homebrew/versions
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 | |
# https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04 | |
# Download the Let’s Encrypt Client | |
cd /usr/local/sbin | |
sudo wget https://dl.eff.org/certbot-auto | |
sudo chmod a+x /usr/local/sbin/certbot-auto | |
# Set Up the SSL Certificate |
NewerOlder