Skip to content

Instantly share code, notes, and snippets.

View ypelud's full-sized avatar

Yann-Cyril Pelud ypelud

  • @yc_p
  • Lille, France
View GitHub Profile
@ypelud
ypelud / gist:3a0d9dbbeac7a4393ccc47f69caddd24
Created June 10, 2024 19:22
delete runs in Github actions
# Adapted from https://blog.oddbit.com/post/2022-09-22-delete-workflow-runs/
export REPO_NAME="owner/myrepo"
export WORKFLOW_NAME="myworkflow"
gh run list --json databaseId --repo ${REPO_NAME} -w "${WORKFLOW_NAME}" -q '.[].databaseId' |
xargs -IID gh api "repos/${REPO_NAME}/actions/runs/ID" -X DELETE --silent
# Originally from here : https://gist.github.com/ngaffa/15d46c98dd82620c8120ddf7398d6dbd
#cloud-config
package_update: true
package_upgrade: true
packages:
# Update the apt package index and install packages needed to use the Docker and Kubernetes apt repositories over HTTPS
- apt-transport-https
- ca-certificates
- curl
@ypelud
ypelud / update_plugin.js
Created April 21, 2016 13:49
Update Cordova plugins
#!/usr/bin/env node
var fs = require('fs'),
path = require('path'),
suspend = require('suspend'),
resume = suspend.resume,
xml2js = require('xml2js'),
parseString = xml2js.parseString;
var setConfigXml = suspend(function*(rootdir) {
@ypelud
ypelud / test.js
Created October 30, 2015 09:38
can't figure out suspend ....
#!/usr/bin/env node
var
Q = require('Q'),
suspend = require('suspend');
function test() {
var q = Q.defer();
setTimeout(function() {
console.log('time out');