- Add your project logo.
- Write a short introduction to the project.
- If you are using badges, add them here.
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 | |
namespace App\Jobs; | |
use App\Models\GeneralExport; | |
use Storage; | |
class CreateGeneralExportFileJob implements ShouldQueue | |
{ |
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
// Core assets | |
let coreAssets = []; | |
// On install, cache core assets | |
self.addEventListener('install', function (event) { | |
// Cache core assets | |
event.waitUntil(caches.open('app').then(function (cache) { | |
for (let asset of coreAssets) { | |
cache.add(new Request(asset)); |
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
<!-- Sentry.js Config --> | |
<script src="https://js.sentry-cdn.com/{{ENV['SENTRY_PUBLIC_DSN']}}.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
// custom functions to handle errors in JS. | |
function handleRouteError(err) { | |
Sentry.captureException(err); | |
} | |
function errorHandler(error, data, level) { | |
level = level || 'info'; |
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
echo '.env' >> .gitignore | |
git rm -r --cached .env | |
git add .gitignore | |
git commit -m 'untracking .env' | |
git push origin master |
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
<template> | |
<div id="demo"> | |
<h1>Latest Vue.js Commits</h1> | |
<template v-for="branch in branches"> | |
<input type="radio" | |
:id="branch" | |
:value="branch" | |
name="branch" | |
v-model="currentBranch"> | |
<label :for="branch">{{ branch }}</label> |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "October CMS demo infrastructure.", | |
"Parameters": { | |
"KeyName": { | |
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instance", | |
"Type": "AWS::EC2::KeyPair::KeyName", | |
"ConstraintDescription": "must be the name of an existing EC2 KeyPair." | |
}, | |
"StagingInstanceType": { |
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 League\Csv\Writer; | |
use League\Csv\Reader; | |
use League\Csv\CannotInsertRecord; | |
use Illuminate\Support\Facades\Storage; | |
$now = now()->format('U'); | |
$fileName = "file-$now.csv"; | |
$storageInstance = Storage::disk('s3'); |
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
'use strict'; | |
const querystring = require('querystring'); | |
const aws = require('aws-sdk'); | |
const s3 = new aws.S3({ | |
region: 'ap-northeast-2', | |
signatureVersion: 'v4' | |
}); | |
const sharp = require('sharp'); |
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
// Lambda function to set cache control public header in case of missing cache control header | |
exports.handler = (event, context, callback) => { | |
const { response } = event.Records[0].cf; | |
const { headers } = response; | |
const headerCacheControl = 'Cache-Control'; | |
const defaultTimeToLive = 60 * 60 * 24 * 14; // 14 days | |
if (response.status === '200') { | |
if (!headers[headerCacheControl.toLowerCase()]) { |
NewerOlder