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
| { | |
| "variables": { | |
| "aws_access_key": "", | |
| "aws_secret_key": "" | |
| }, | |
| "builders": [{ | |
| "type": "amazon-ebs", | |
| "access_key": "{{user `aws_access_key`}}", | |
| "secret_key": "{{user `aws_secret_key`}}", | |
| "region": "us-east-2", |
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
| #!/usr/bin/env python3 | |
| from datetime import datetime | |
| from ftplib import FTP | |
| from functools import partial | |
| import hashlib | |
| import logging | |
| import os | |
| import sys | |
| import boto3 | |
| from botocore.errorfactory import ClientError |
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
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import imaplib | |
| import email | |
| import email.header | |
| import datetime | |
| import boto3 | |
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
| #!/usr/bin/env groovy | |
| import groovy.json.*; | |
| import java.nio.file.Files; | |
| /** | |
| * GitHubRelease | |
| */ | |
| class GitHubRelease { | |
| String githubToken |
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
| /* | |
| Simple Proxy server using Chrome-Puppeteer. | |
| Can be used by Webspiders to render the HTML elements | |
| on dynamic websites. | |
| */ | |
| const puppeteer = require('puppeteer') | |
| const http = require('http') | |
| const validUrl = require('valid-url'); | |
| const url = require('url') | |
| const port = 3000 |
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
| class Storage { | |
| /* | |
| * This class exists to handle caching data between a page refresh. | |
| * | |
| * Usage example for setData: | |
| * | |
| * >> let myData = {"brand": "Example Brand", "brand_slug": "example_brand"} | |
| * | |
| * >> let store = new Storage('1', 'brands') | |
| * >> store.setData(myData) |
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
| $ sudo snap install microk8s | |
| $ microk8s.enable dns dashboard ingress | |
| $ nap alias microk8s.kubectl kubectl | |
| $ kubectl config view --raw > $HOME/.kube/config | |
| Download terraform: https://www.terraform.io/downloads.html |
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
| /** | |
| * An example for how a tabbed component in Vue can be done. | |
| */ | |
| //VueX store | |
| const store = new Vuex.Store({ | |
| state: { | |
| user: {} // <<<--- this is object. use Vue.set() to manipulate for reactivity!!! | |
| }, | |
| getters: { |
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
| /** | |
| * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes | |
| * | |
| * JavaScript classes, introduced in ECMAScript 2015, | |
| * are primarily syntactical sugar over JavaScript's existing prototype-based inheritance. | |
| * | |
| * The class syntax does not introduce a new object-oriented inheritance model to JavaScript. | |
| * | |
| * I prefer to keep using the older style 'prototype' when writing code in JS. | |
| */ |
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
| -- DOUBLE ACTIVE SUBSCRIPTIONS | |
| select | |
| s.subscription_id, | |
| o.order_id, | |
| s.next_billing_date as sub_billing_date, | |
| o.billing_date as order_billing_date, | |
| o.status as order_status, | |
| s.status as subscription_status, | |
| o.first_name, | |
| o.last_name |