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 | |
$array = []; | |
foreach ($_POST['name'] as $key => $value) { | |
$array[$key]['name'] = $value; | |
$array[$key]['email'] = $_POST['email'][$key]; | |
} | |
var_dump($array); |
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
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/sumonselim/.oh-my-zsh | |
# Set name of the theme to load. | |
ZSH_THEME="powerlevel9k/powerlevel9k" | |
# powerlevel9k customizations | |
POWERLEVEL9K_MODE='awesome-patched' | |
POWERLEVEL9K_SHORTEN_DIR_LENGTH=3 | |
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle" |
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 | |
# Variables | |
APPENV=local | |
DBHOST=localhost | |
DBNAME=dbname | |
DBUSER=dbuser | |
DBPASSWD=test123 | |
echo -e "\n--- Mkay, installing now... ---\n" |
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 THESE OUTSIDE `server` BLOCK ### | |
# set cache path, key and expiration time | |
fastcgi_cache_path /tmp/cache levels=1:2 keys_zone=MYAPP:512m inactive=60m; | |
# handle nginx crash, timeout, error responses and serve cached data | |
fastcgi_cache_use_stale error timeout invalid_header http_500; | |
# ignore cache headers | |
fastcgi_ignore_headers Cache-Control Expires Set-Cookie; |
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 annotations support for route 🚀 | |
composer require annotations | |
# Symfony maker bundle added for quick development 📦 | |
composer require symfony/maker-bundle --dev | |
# For database | |
composer require symfony/orm-pack | |
# Security 👮 |
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
wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-8.2.2-x64.bin | |
chmod a+x atlassian-jira-software-8.2.2-x64.bin | |
sudo ./atlassian-jira-software-8.2.2-x64.bin | |
# letencrypt ssl | |
sudo certbot certonly --standalone -d jira.kodeeo.com | |
# add JAVA_HOME to /etc/environment | |
JAVA_HOME="/opt/atlassian/jira/jre/bin" |
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 | |
$tag_to_add = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'; | |
$file = 'file.xml'; | |
// Using file_put_contents() | |
$myfile = file_put_contents($file, $tag_to_add.PHP_EOL , FILE_APPEND | LOCK_EX); | |
// Using fwrite() | |
$fstream = fopen($file, 'a'); | |
fwrite($fstream, '\n'. $tag_to_add); |
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 Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\Storage; | |
class SnapshotCommand extends 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
server { | |
listen 443 default_server; | |
root /var/www/web; | |
# Only return Nginx in server header | |
server_tokens off; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/server.pem; | |
ssl_certificate_key /etc/nginx/ssl/server.key; | |
# POODLE protection |
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\Country; | |
use Illuminate\Database\Seeder; | |
class CountriesTableSeeder extends Seeder | |
{ | |
public function run() | |
{ | |
$countries = [ |
OlderNewer