Skip to content

Instantly share code, notes, and snippets.

View nerdCopter's full-sized avatar

nerdCopter nerdCopter

View GitHub Profile
@nerdCopter
nerdCopter / git_notes.txt
Last active December 8, 2023 15:12
git usage notes
git_notes.txt -- assumes CLI in Linux/OSX or Cygwin or WSL (Windows SubSystem for Linux).
https://git-scm.com/docs/
https://www.atlassian.com/git/tutorials/
---
##################################################
### Recommended Windows vs Linux Compatibility ###
##################################################
# recommended git global environment configs:
# windows:

With GitHub Actions, a workflow can publish artifacts, typically logs or binaries. As of early 2020, the life time of an artifact is hard-coded to 90 days (this may change in the future). After 90 days, an artifact is automatically deleted. But, in the meantime, artifacts for a repository may accumulate and generate mega-bytes or even giga-bytes of data files.

It is unclear if there is a size limit for the total accumulated size of artifacts for a public repository. But GitHub cannot reasonably let multi-giga-bytes of artifacts data accumulate without doing anything. So, if your workflows regularly produce large artifacts (such as "nightly build" procedures for instance), it is wise to cleanup and delete older artifacts without waiting for the 90 days limit.

Using the Web page for the "Actions" of a repository, it is possible to browse old workflow runs and manually delete artifacts. But the procedure is slow and tedious. It is fine to delete one selected artifact. It is not for a regular cleanup. We need

@lsemenenko
lsemenenko / main.sh
Created February 22, 2020 06:18
Trigger Github Actions repository_dispatch with curl
#!/bin/bash
TOKEN=""
REPO="" # format: username/repository
EVENT_TYPE=""
curl -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${TOKEN}" \
--request POST \
--data '{"event_type": "${EVENT_TYPE}"}' \
@lelegard
lelegard / purging-old-artifacts-with-github-api.md
Last active January 18, 2024 07:19
Purging old artifacts with GitHub Actions API

With GitHub Actions, a workflow can publish artifacts, typically logs or binaries. As of early 2020, the life time of an artifact is hard-coded to 90 days (this may change in the future). After 90 days, an artifact is automatically deleted. But, in the meantime, artifacts for a repository may accumulate and generate mega-bytes or even giga-bytes of data files.

It is unclear if there is a size limit for the total accumulated size of artifacts for a public repository. But GitHub cannot reasonably let multi-giga-bytes of artifacts data accumulate without doing anything. So, if your workflows regularly produce large artifacts (such as "nightly build" procedures for instance), it is wise to cleanup and delete older artifacts without waiting for the 90 days limit.

Using the Web page for the "Actions" of a repository, it is possible to browse old workflow runs and manually delete artifacts. But the procedure is slow and tedious. It is fine to delete one selected artifact. It is not for a regular cleanup. We need

@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active June 9, 2024 07:46
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@sreyemnayr
sreyemnayr / colorterm.sh
Created March 21, 2019 15:43
Auto-color terminal background to avoid ssh production oopsiedaisies
#!/bin/bash
#
# Based almost entirely on Bryan Gilbert's solution:
# http://bryangilbert.com/post/etc/term/dynamic-ssh-terminal-background-colors/
#
# Sets terminal screen to color based on keywords or hex code (no #, for some reason that breaks)
#
# For SSH magic, add following to ~/.zshrc:
#
: <<'END_COMMENT'
@exocode
exocode / quadcopter_betaflight-cheat_sheet.md
Last active April 3, 2024 19:46
The Quadcopter and Betafilght Cheat Sheet

Quadcopter and Betaflight cheat sheet

Introduction

On my yourney though hundreds of videos, tutorials and manuals (Bardwell, UAV Tech, JohnnyFPV, Mr. Steele, Le Drib, RotorRiot (sorry, for the missed ones) and wrote down their suggestions). This is the result of my notes. It should provide the least necessary but most compressed information to start tuning and setting your Quadcopter. In my case I use the widely spread Taranis X7 remote control.

I am a freestyle pilot, so keep in mind, that these settings are in this scope (more smooth, softer flight behaviour).

Remote Control (Taranis X7)

@Erikdegroot89
Erikdegroot89 / list-updates.sh
Created February 1, 2019 10:16
Get all commits since last tag
git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline > new-in-this-release.log
@jhochwald
jhochwald / Approve-WSUSLicenseAgreementAcceptance.ps1
Created December 15, 2018 20:32
Accept License Agreements for all Windows Server Update Services (WSUS) Updates
#requires -Version 3.0 -Modules UpdateServices
<#
.SYNOPSIS
Accept License Agreements
.DESCRIPTION
Accept License Agreements for all Windows Server Update Services (WSUS) Updates
.PARAMETER Name

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");