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 | |
# vim: ai ts=2 sw=2 et sts=2 ft=sh | |
# Check OS. | |
if [[ ! "${OSTYPE}" =~ "^linux" ]] || [[ ! "$(lsb_release -c 2>/dev/null)" =~ "xenial" ]]; then | |
(>&2 echo "Error: This script is for Ubuntu 16.04 LTS (xenial) not '${OSTYPE}'.") | |
exit 1; | |
fi | |
sudo apt-get update |
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
/* Using a JavaScript proxy for a super low code REST client */ | |
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
// also see https://github.com/fastify/manifetch | |
// also see https://github.com/flash-oss/allserver | |
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
const createApi = (url) => { | |
return new Proxy({}, { | |
get(target, key) { |
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
"use strict"; | |
require("dotenv").config(); | |
/** | |
* An asynchronous bootstrap function that runs before | |
* your application gets started. | |
* | |
* This gives you an opportunity to set up your data model, | |
* run jobs, or perform some special logic. | |
* | |
* See more details here: https://strapi.io/documentation/3.0.0-beta.x/concepts/configurations.html#bootstrap |
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
import boto3 | |
from PIL import Image | |
from io import BytesIO | |
import os | |
class S3ImagesInvalidExtension(Exception): | |
pass | |
class S3ImagesUploadFailed(Exception): | |
pass |
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
console.log("new form git hub gist"); | |
var cartItems = [] | |
$(document).ready(function(){ | |
$(".goto-form").click(function(){ | |
console.log("on the button click") | |
$("#step1").toggle(); | |
$("#step2").toggle(); | |
}) | |
$(".add-addon").click(function(){ | |
$(this).toggle(); |
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
"autoload": { | |
"psr-4": { | |
"": "vendor/phpoffice/phpexcel/Classes/", | |
}, |
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 Doctrine\Common\Annotations\AnnotationRegistry; | |
use Composer\Autoload\ClassLoader; | |
/** | |
* @var ClassLoader $loader | |
*/ | |
$loader = require __DIR__.'/../vendor/autoload.php'; |
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 Maatwebsite\Excel\Writers; | |
use Maatwebsite\Excel\Classes\LaravelExcelWorksheet; | |
/** | |
* | |
* LaravelExcel Excel writer | |
* | |
* @category Laravel Excel | |
* @version 1.0.0 |