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
<script src="./js/sw-controller.js" defer></script> | |
<script src="./js/main.js" defer></script> | |
<script src="./js/lazysizes.min.js" defer></script> |
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
// Pastikan anda telah mendaftarkan di cloudinary | |
// Dokumentasi tentang fetch remote images: https://cloudinary.com/documentation/fetch_remote_images | |
function cloudinaryJpg(thumbnail) { | |
return `https://res.cloudinary.com/{youraccountname}/image/fetch/c_scale,fl_force_strip.progressive,w_478/f_jpg/${thumbnail}` | |
} |
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
<!-- Preconnect --> | |
<link rel="preconnect" href="https://api.rss2json.com" crossorigin> | |
<!-- DNS Prefetch --> | |
<link rel="dns-prefetch" href="https://cdn-images-1.medium.com"> | |
<!-- Preload --> | |
<link rel="preload" href="./dist/css/mini-default.min.css" as="style" media="(min-width: 20em)"> |
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 combine_arrays($arrays) { | |
$results = array(); | |
foreach ($arrays as $subKey => $arr) { | |
foreach ($arr as $index => $key) { | |
$results[$index][$subKey] = $arr[$index]; | |
} | |
} | |
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 combine_keys_with_arrays($keys, $arrays) { | |
$results = array(); | |
foreach ($arrays as $subKey => $arr) | |
{ | |
foreach ($keys as $index => $key) | |
{ | |
$results[$key][$subKey] = $arr[$index]; |
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
@servers(['web' => '[email protected]']) | |
@setup | |
$repository = '[email protected]:satyakresna/test-laravel.git'; | |
$releases_dir = '/var/www/test-laravel/releases'; | |
$app_dir = '/var/www/test-laravel'; | |
$release = 'release_' . date('YmdHis'); | |
$new_release_dir = $releases_dir .'/'. $release; | |
@endsetup |
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
server { | |
listen 80; | |
server_name phpbali.com www.phpbali.com; | |
root /var/www/site.com/current/public; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header X-XSS-Protection "1; mode=block"; | |
add_header X-Content-Type-Options "nosniff"; | |
index index.php; |
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
# Set the base image for subsequent instructions | |
FROM php:latest | |
# Update packages | |
RUN apt-get update | |
# Install PHP and composer dependencies | |
RUN apt-get install -qq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev | |
# Clear out the local repository of retrieved package files |
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 | |
if ($_FILES AND $_FILES['surat_file']['name']) { | |
$count_file = count($_FILES['surat_files']['name']); | |
for ($i = 0; $i < $count_file; $i++) { | |
$_FILES['surat_file']['name'] = $_FILES['surat_files']['name'][$i]; | |
$_FILES['surat_file']['type'] = $_FILES['surat_files']['type'][$i]; | |
$_FILES['surat_file']['tmp_name'] = $_FILES['surat_files']['tmp_name'][$i]; | |
$_FILES['surat_file']['error'] = $_FILES['surat_files']['error'][$i]; | |
$_FILES['surat_file']['size'] = $_FILES['surat_files']['size'][$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 | |
return [ | |
/* | |
|-------------------------------------------------------------------------- | |
| Default deployment strategy | |
|-------------------------------------------------------------------------- | |
| | |
| This option defines which deployment strategy to use by default on all |