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 hidden or 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
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string] $PythonVersion | |
) | |
$ErrorActionPreference = "Stop" | |
$ProgressPreference = "SilentlyContinue" | |
Set-StrictMode -Version Latest |
This file contains hidden or 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 ruby | |
# | |
# Convert blogger (blogspot) posts to jekyll posts | |
# | |
# Basic Usage | |
# ----------- | |
# | |
# ./blogger_to_jekyll.rb feed_url | |
# | |
# where `feed_url` can have the following format: |
This file contains hidden or 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 | |
# Colors definitions | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
BOLD=$(tput bold) | |
NORMAL=$(tput sgr0) | |
# Check if necessary applications are installed |
This file contains hidden or 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 [[ $1 == "dark" ]]; then | |
UI_THEME_GTK="Mojave-dark" | |
UI_THEME_QT="KvMojave" | |
UI_ICONS="Faenza-Ambiance" | |
VIM_BG="dark" | |
elif [[ $1 == "light" ]]; then | |
UI_THEME_GTK="Mojave-light" | |
UI_THEME_QT="KvMojaveLight" |
This file contains hidden or 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
_composer() | |
{ | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
local cmd=${COMP_WORDS[0]} | |
if ($cmd > /dev/null 2>&1) | |
then | |
COMPREPLY=( $(compgen -W "$($cmd list | awk '$0 ~ /^ .*/' | awk {'print $1'} | grep -io '[^/_,]*' | grep -v 'command')" -- $cur) ) | |
fi | |
} | |
complete -F _composer composer |
This file contains hidden or 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 | |
function seo_link($title) | |
{ | |
$title = str_replace(array('I', 'İ'), 'i', $title); | |
$title = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $title); | |
return url_title($title, '-', true); | |
} | |
$title = "Türkçe karakter içeren link IĞÜŞİÖÇ"; |
This file contains hidden or 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 | |
function image_thumb($file, $width = 460, $height = 0, $save = true, $quality = 80) | |
{ | |
$qual = round(9 - ($quality / (100 / 9))); | |
//log_message('debug',"Kalite: $quality $qual"); | |
$i = $file; | |
$x = $width; | |
$y = $height; |
This file contains hidden or 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 PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_indentation' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', |
This file contains hidden or 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 ruby | |
require 'tmpdir' | |
require 'fileutils' | |
dir = Dir.tmpdir() | |
if File.directory?("#{dir}/bulma") | |
FileUtils.remove_dir("#{dir}/bulma") | |
end |
NewerOlder