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
bindings | |
componentstatuses cs | |
configmaps cm | |
endpoints ep | |
events ev | |
limitranges limits | |
namespaces ns | |
nodes no | |
persistentvolumeclaims pvc | |
persistentvolumes pv |
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
function laravel_set_permission() { | |
sudo find . -type f -exec chmod 644 {} \; | |
sudo find . -type d -exec chmod 755 {} \; | |
laravel_storage_permission | |
} | |
function laravel_storage_permission() { | |
# storage & bootstrap/cache should be writable by server | |
sudo chown -R $USER:www-data storage bootstrap/cache |
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 | |
# download video/audio from youtube for another sites | |
#### Format for video | |
#./yt-download.sh 'url' 'specifiy type [video,audio]' 'download_location' | |
URL=$1 | |
DOWNLOAD_AS=${2:-'video'} | |
if [[ -z $(command -v youtube-dl) ]]; then |
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 | |
# toggle bluetooth connection (on/off) & connect devices (connect/disconnect) | |
# run "bluetoothctl" to find the MAC address of your device. | |
# default MAC (Airdots) | |
MAC="00:00:00:00:00:00" | |
enable() { | |
rfkill unblock bluetooth | |
} |
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
server { | |
listen 80; | |
root /var/www/html/subdomain/web-app/public; | |
index index.php index.html index.htm index.nginx-debian.html; | |
server_name app.web-app.com; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} |
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
server { | |
listen 80 ; | |
#server_name ~^(www\.)?(?<sname>.+?).<ip>.xip.io$; | |
server_name ~^(?<sname>.+?).<ip>.xip.io$; | |
root /var/www/html/review.anipat/$sname; | |
index index.php index.html index.htm index.nginx-debian.html; |
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 | |
#format = sudo manage-etc-hosts.sh <docker_webserver_container_name> <domain> | |
set -eu | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# PATH TO YOUR HOSTS FILE |
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 master image | |
FROM php:7.3-fpm-alpine | |
MAINTAINER Rajesh Chaudhary <[email protected]> | |
# Copy composer.lock and composer.json | |
#COPY composer.lock composer.json /var/www/ | |
# Set working directory | |
WORKDIR /var/www |
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
server { | |
listen 80; | |
server_name domain.com www.domain.com; | |
return 301 https://domain.com$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name www.domain.com; | |
return 301 https://domain.com$request_uri; | |
#ssl_certificate /etc/ssl/sites/domain.com.pem; |
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(['production' => '[email protected]']) | |
@setup | |
$repo = '[email protected]:<username>/<project-name>.git'; | |
date_default_timezone_set('Asia/Kathmandu'); | |
$release = date('YmdHis'); | |
$releases_dir = '/var/www/html/final/releases'; | |
$app_dir = '/var/www/html/final'; | |
$new_release_dir = $releases_dir .'/'. $release; |
NewerOlder