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
| #!/bin/sh | |
| ECHO='echo ' | |
| for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'main$\|develop$'); do | |
| if ! ( [[ -f "$branch" ]] || [[ -d "$branch" ]] ) && [[ "$(git log $branch --since "1 month ago" | wc -l)" -eq 0 ]]; then | |
| if [[ "$DRY_RUN" = "false" ]]; then | |
| ECHO="" | |
| fi | |
| local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///') | |
| $ECHO git branch -d "${local_branch_name}" |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| # | |
| # Updated to use Python 3 by Malcolm Greaves. | |
| # | |
| # Python script to find the largest files in a git repository. | |
| # The general method is based on the script in this blog post: | |
| # http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ | |
| # | |
| # The above script worked for me, but was very slow on my 11GB repository. This version has a bunch |
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
| pipeline { | |
| agent any | |
| environment { | |
| SECRET_TEXT = credentials("my-secret-text-crendentials-id") | |
| USERNAME_PASSWORD = credentials("my-username-password-crendentials-id") | |
| } | |
| stages { |
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
| # use the latest ubuntu environment (18.04) available on travis | |
| dist: bionic | |
| language: go | |
| # You don't need to test on very old versions of the Go compiler. It's the user's | |
| # responsibility to keep their compiler up to date. | |
| go: | |
| - 1.16.x |
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
| #!/boot/bzImage | |
| # Linux kernel userspace initialization code, translated to bash | |
| # (Minus floppy disk handling, because seriously, it's 2017.) | |
| # Not 100% accurate, but gives you a good idea of how kernel init works | |
| # GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st> | |
| # Based on Linux 4.10-rc2. | |
| # Note: pretend chroot is a builtin and affects the current process | |
| # Note: kernel actually uses major/minor device numbers instead of device name |
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
| class Mailgun { | |
| function post($headers, $url, $data){ | |
| $handle = curl_init(); | |
| curl_setopt($handle, CURLOPT_URL, $url); | |
| curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); | |
| curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); | |
| curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($handle, CURLOPT_POST, true); | |
| curl_setopt($handle, CURLOPT_POSTFIELDS, $data); |
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
| # LVM Parser & Block Reader | |
| # | |
| # Copyright (C) 2016 Red Hat Inc | |
| require 'optparse' | |
| require 'ostruct' | |
| require 'binary_struct' | |
| ### constants |
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
| #!/bin/sh | |
| ECHO='echo ' | |
| for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do | |
| if [[ "$(git log $branch --since "6 months ago" | wc -l)" -eq 0 ]]; then | |
| if [[ "$DRY_RUN" = "false" ]]; then | |
| ECHO="" | |
| fi | |
| local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///') | |
| $ECHO git branch -d "${local_branch_name}" |
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
| import os | |
| import socket | |
| import struct | |
| # These constants map to constants in the Linux kernel. This is a crappy | |
| # way to get at them, but it'll do for now. | |
| RTMGRP_LINK = 1 | |
| NLMSG_NOOP = 1 | |
| NLMSG_ERROR = 2 |
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
| #!/usr/bin/env bash | |
| # | |
| # Generate a set of TLS credentials that can be used to run development mode. | |
| # | |
| # Based on script by Ash Wilson (@smashwilson) | |
| # https://github.com/cloudpipe/cloudpipe/pull/45/files#diff-15 | |
| # | |
| # usage: sh ./genkeys.sh NAME HOSTNAME IP | |
| set -o errexit |
NewerOlder