Skip to content

Instantly share code, notes, and snippets.

View lenowng's full-sized avatar
🥔
potating

Leon Wong lenowng

🥔
potating
  • ServiceRocket
  • Malaysia
View GitHub Profile
@phawk
phawk / install.js
Created August 23, 2019 16:17
Shopify install lambda
exports.handler = async (event, context) => {
const shop = event.queryStringParameters.shop
const redirectUri = event.queryStringParameters.redirect
const apiKey = process.env.SHOPIFY_API_KEY
const scopes="read_content,write_content,read_products,read_themes,write_themes"
if (shop) {
const installUrl = 'https://' + shop +
'/admin/oauth/authorize?client_id=' + apiKey +
'&scope=' + scopes +
@yclian
yclian / Jenkinsfile
Last active June 2, 2016 06:28
Terraform on Jenkins
node {
def ak = "<AWS_ACCESS_KEY>"
def id = "${env.JOB_NAME}-${env.BUILD_ID}"
def wd = pwd()
def run = "docker run --rm -u `id -u jenkins` -v ${wd}:/tmp/${id} -w=/tmp/${id} -e AWS_ACCESS_KEY_ID=${ak} -e AWS_SECRET_ACCESS_KEY=${env.ask} --entrypoint=/go/bin/terraform hashicorp/terraform:full"
git credentialsId: '<CREDS_ID>', url: '<GIT_URL>'
withCredentials([[$class: 'StringBinding', credentialsId: '<CREDS_ID_2>', variable: 'ask']]) {
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 15, 2024 23:29
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites