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
| def create_zip(path) do | |
| old_path = File.cwd! | |
| File.cd! path | |
| :zip.create("images.zip", ['images'], [{:cwd, path}]) | |
| File.cd! old_path | |
| path<>"/images.zip" | |
| end |
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
| def send_email(email, csv_path, zip_path) do | |
| attachments = if !is_nil(zip_path) do | |
| [Bamboo.Attachment.new(zip_path)] | |
| else | |
| [] | |
| end | |
| attachments = [Bamboo.Attachment.new(csv_path) | attachments] | |
| new_email(attachments: attachments) | |
| |> subject("Your download is here") | |
| |> from("[email protected]") |
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
| import * as routing from "workbox-routing"; | |
| import * as core from "workbox-core"; | |
| import * as strategies from "workbox-strategies"; | |
| import * as expiration from "workbox-cache-expiration"; | |
| import * as cacheableResponse from "workbox-cacheable-response"; | |
| self.addEventListener("sync", function (event) { | |
| console.log("Event from sw: ", event); | |
| }); | |
| self.addEventListener("install", function () { |
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
| import React from "react"; | |
| import App, { Container } from "next/app"; | |
| import { Provider } from "react-redux"; | |
| import MainLayout from "../components/Layouts/MainLayout"; | |
| class MyApp extends App { | |
| static async getInitialProps({ Component, ctx }) { | |
| return {} | |
| } |
OlderNewer