This file contains hidden or 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
for x in $(gh pr list --state merged --json headRefName --limit 400 | jq --raw-output ".[].headRefName"); do | |
git branch -D $x | |
done |
This file contains hidden or 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
// _mapToSearch is a map of maps | |
// path is something like "commit.author.name" | |
String getNestedElementInMap(Map _mapToSearch, String path){ | |
def elements = path.split('\\.') | |
def currentValue = _mapToSearch | |
println(elements) | |
for(key in elements){ | |
currentValue = currentValue[key] |
This file contains hidden or 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
# Rofi | |
download a release from here https://github.com/DaveDavenport/rofi/releases | |
https://github.com/DaveDavenport/rofi/blob/next/INSTALL.md | |
sudo apt-get install gcc \ | |
bison \ | |
flex \ | |
pkg-config \ | |
libxkbcommon-x11-dev \ | |
libglib2.0-0 \ |
This file contains hidden or 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
for(j in jenkins.model.Jenkins.theInstance.getAllItems()) { | |
j.delete() | |
} |
This file contains hidden or 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
def signature = 'new method something' | |
org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.get().approveSignature(signature) |
This file contains hidden or 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
// SERVER SIDE | |
SockAddr := "/tmp/sample.sock" | |
func main() { | |
if err := os.RemoveAll(SockAddr); err != nil { | |
log.Fatal(err) | |
} | |
listener, err := net.Listen("unix", SockAddr) |
This file contains hidden or 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
dd if=path/to/image.iso of=/dev/sd# |