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 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', |
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
/* | |
* 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 | |
* |
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
#!/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" |
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
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 |