Skip to content

Instantly share code, notes, and snippets.

View brucellino's full-sized avatar
🌈
EGI

Bruce Becker brucellino

🌈
EGI
View GitHub Profile
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active April 22, 2024 16:22
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

@nilesh-akhade
nilesh-akhade / OWASP_Kuberneres.md
Created September 13, 2022 10:10
Attempt to map OWASP Top10 security risks with Aqua's Trivy Scanner

OWASP to Trivy Checks Mapping

  • OWASP#1 Insecure Workload Configurations

    • Trivy checks - KSV001, KSV014, KSV017
  • OWASP#2 Supply Chain Vulnerabilities

    • Manual - Image Integrity
    • Manual - SBOM
    • Manual - Image Signing
  • Manual - Image Composition

@krisadm315
krisadm315 / README.md
Created July 28, 2020 01:52 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@seignovert
seignovert / README.md
Last active February 21, 2019 20:08
[Zenodo] Add ORCID badge

Add ORCID badge to Zenodo publication

No longer required since Oct-2017. Now ORCID can be added directly under the Authors section of the metadata on the deposit web interface.

Create your personal access token

In order to access the API you need to create a personal token. To do that you need to:

  1. Go to Home > Account > Applications and + New token in the Personal access tokens section.
  2. Provide a name for the token to find it later
@ryansch
ryansch / tar.rb
Created June 16, 2016 12:17
Create/Extract a tarball from ruby
require 'find'
require 'archive/tar/minitar'
module IdiomaticTar
def create_tarball(filename:, directory:)
base_dir = Pathname.new(directory).parent
FileUtils.cd(base_dir) do
Pathname.new(filename).open('wb') do |tarball|
Zlib::GzipWriter.wrap(tarball) do |gz|
Archive::Tar::Minitar::Output.open(gz) do |tar|
@lukas-h
lukas-h / license-badges.md
Last active April 21, 2024 09:35
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@arfon
arfon / generate
Last active April 6, 2023 10:37
Let's try and generate some codemeta files.
#!/usr/bin/ruby
# For an OO language, this is distinctly procedural. Should probably fix that.
require 'json'
details = Hash.new({})
capture_params = [
{ :name => "title", :message => "Enter project name." },
{ :name => "url", :message => "Enter the URL of the project repository." },
@bot11
bot11 / install_java_from_source.txt
Created April 4, 2015 02:12
Install java from source
Download java from this link:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Alternatively , wget as below:
wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
sudo mv jdk-7u51-linux-x64.tar.gz /usr/lib/jvm [create if /usr/lib/jvm not present, can be put in /usr/local also.]
sudo tar zxvf jdk-7u51-linux-x64.tar.gz
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_51/bin/javac 1
@dnozay
dnozay / _Jenkins+Script+Console.md
Last active April 10, 2024 06:11
jenkins groovy scripts collection.
@jorgemanrubia
jorgemanrubia / discourse_users_merger.rb
Last active April 18, 2022 12:53
Script for merging existing discourse users
module DiscourseUsersMerger
class Merger
def merge(target_username, source_username)
raise "User to merge and target user can't be the same" if target_username == source_username
target_user = User.find_by_username!(target_username)
source_user = User.find_by_username!(source_username)
puts "About to merge #{source_username} (#{source_user.email}) into #{target_username} (#{target_user.email})"
puts "#{source_user.topics.count} topics with #{source_user.posts.count} posts will be moved. Ok to continue? (y/n)"
continue = STDIN.gets.chomp.downcase == 'y'