Skip to content

Instantly share code, notes, and snippets.

View simondch's full-sized avatar
🏠
Working from home

Simon D. simondch

🏠
Working from home
  • Toulouse - France
View GitHub Profile
@simondch
simondch / markdown-details-collapsible.md
Created January 31, 2024 13:34 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
import jenkins.model.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey
import com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsImpl
import org.jenkinsci.plugins.plaincredentials.StringCredentials
import org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl
def showRow = { credentialType, secretId, username = null, password = null, description = null ->
@simondch
simondch / clean-branches.sh
Last active March 10, 2021 10:09
Git: remove tracking local branches not on remote anymore
#! /bin/bash
git fetch -p && \
for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | \
awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done
@simondch
simondch / readme.md
Created February 18, 2021 16:25
delete node_modules recursively

Linux / Mac OS

List

find . -name "node_modules" -type d -prune | xargs du -chs

Delete

find . -name "node_modules" -type d -prune -exec rm -rf '{}' +