Skip to content

Instantly share code, notes, and snippets.

View style95's full-sized avatar

Dominic Kim style95

  • Naver
View GitHub Profile
import axios from 'axios'
async function main() {
const USERNAME='style95';
const ACCESS_TOKEN='***********';
const authorizationHeader = 'Basic ' + new Buffer(USERNAME + ':' + ACCESS_TOKEN).toString('base64');
const MASTER_BASE_URL = 'https://api.github.com/repos/apache/openwhisk/commits?per_page=100&sha=master';
const RELEASE_BASE_URL = 'https://api.github.com/repos/apache/openwhisk/commits?per_page=1&sha=1.0.0';
const data = await axios({
method: 'get',
@style95
style95 / build.gradle
Created May 24, 2022 13:08
Run OpenWhisk on M1 Mac.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
#!/bin/bash
veth_in_use=()
veth_all=()
for container in $(docker ps --format '{{.Names}}'); do
pid=$(docker inspect --format '{{.State.Pid}}' $container)
ifindex=$(nsenter -t $pid -n ip link | sed -n -e 's/.*eth0@if\([0-9]*\):.*/\1/p')
if [ -z "$ifindex" ]; then
echo "container:$container doesn't have veth"
var request = require('request');
/**
* Feed to create a webhook on Github
* @param {object} params - information about the trigger
* @param {string} repository - repository to create webhook
* @param {string} username - github username
* @param {string} accessToken - github access token
* @param {string} events - list of the events the webhook should fire on
* @return {object} whisk async