Skip to content

Instantly share code, notes, and snippets.

@magnetikonline
magnetikonline / README.md
Last active July 23, 2024 00:23
Cleanup legacy GitHub Actions workflow runs.

Cleanup legacy GitHub Actions workflow runs

Python utility to bulk delete GitHub Actions runs for a given workflow, either current or legacy/since removed. The GitHub web UI currently allows removal of individual workflow runs - but this becomes tedious quickly when performed in bulk.

Usage

Create a new Personal access token allowing the workflow scope:

image

@esamattis
esamattis / .babelrc
Last active September 12, 2018 20:55
Typescript type stripping with Babel 7 using few extra Babel plugins
{
"presets": [
"typescript",
"react",
[
"env",
{
"targets": {
"uglify": true
}
@revolunet
revolunet / python-es6-comparison.md
Last active November 2, 2024 12:22
# Python VS JavaScript ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@staltz
staltz / introrx.md
Last active November 14, 2024 11:27
The introduction to Reactive Programming you've been missing
@nuxlli
nuxlli / multiples.js
Last active January 17, 2024 20:27
Multiple bars example with npm `progress`.
var ProgressBar = require('progress');
function Multibar(stream) {
this.stream = stream || process.stderr;
this.cursor = 0;
this.bars = [];
this.terminates = 0;
}
Multibar.prototype = {
@trestletech
trestletech / server.R
Last active January 3, 2016 12:29
Example of using clickId to dynamically cluster points in 2D space.
library(shiny)
library(mclust)
shinyServer(function(input, output, session) {
# Create a spot where we can store additional
# reactive values for this session
val <- reactiveValues(x=NULL, y=NULL)
@jedi4ever
jedi4ever / dns tuning ssh login speedup vagrant
Created May 27, 2013 13:37
speeding up DNS/SSH connections in vagrant
- Tune /etc/ssh/sshd_config
UseDNS no # Disable DNS lookups
GSSAPIAuthentication no # Disable negotation of slow GSSAPI
don't forget to restart it, use a script provider to set it , or create it with veewee or snapshot it
- Tune Vagrantfile
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
@robertsosinski
robertsosinski / trigger.sql
Created November 12, 2012 02:51
Make a table readonly in Postgres
create trigger trades_readonly_trigger before insert or update or delete or truncate on trades for each statement execute procedure readonly_trigger_function();