Skip to content

Instantly share code, notes, and snippets.

View docwhat's full-sized avatar

Christian Höltje docwhat

View GitHub Profile

My notes for using k3d to run clusters locally with Tekton

Updated for working with k3d 3.x

Prereqs:

defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-delay -float 0 && defaults write com.apple.dock autohide-time-modifier -float 0 && killall Dock
@chinshr
chinshr / Jenkinsfile
Last active October 24, 2024 17:13
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
@xbeta
xbeta / 00-set-authorization.groovy
Created November 25, 2014 23:38
put them in $JENKINS_HOME/init.groovy.d/
import jenkins.model.*;
import hudson.security.*;
// JVM did not like 'hypen' in the class name, it will crap out saying it is
// illegal class name.
class BuildPermission {
static buildNewAccessList(userOrGroup, permissions) {
def newPermissionsMap = [:]
permissions.each {
newPermissionsMap.put(Permission.fromId(it), userOrGroup)
#!/bin/bash
JQPATH=$(which jq)
if [ "x$JQPATH" == "x" ]; then
echo "Couldn't find jq executable." 1>&2
exit 2
fi
set -eu
shopt -s nullglob
@bjjb
bjjb / blogeen.rake
Created October 21, 2013 02:57
A simple static website generator
# A very simple Rakefile for generating static sites. It's essentially Hobix,
# but probably simpler. Every page of the site is a YAML file. The YAML file
# gets compiled into a HTML file with the same basename. The content can be
# wrapped in a layout.
require 'rake/clean'
require 'open-uri'
require 'yaml'
require 'erb'
YML = FileList['**/*.yml'].exclude(/^[_.]/)
@docwhat
docwhat / ssl-test.rb
Last active December 19, 2015 03:19
A simple script to troubleshoot SSL problems; notably a missing CA bundle.
#!/usr/bin/env ruby
# A simple script to troubleshoot SSL problems; notably
# a missing CA bundle.
#
# Example errors that can be troubleshot:
# SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
#
# Christian Höltje / docwhat.org
require 'net/https'
@fnichol
fnichol / README.md
Created February 26, 2012 01:23
A Common .ruby-version File For Ruby Projects

A Common .ruby-version File For Ruby Projects

Background

I've been using this technique in most of my Ruby projects lately where Ruby versions are required:

  • Create .rbenv-version containing the target Ruby using a definition name defined in ruby-build (example below). These strings are a proper subset of RVM Ruby string names so far...
  • Create .rvmrc (with rvm --create --rvmrc "1.9.3@myapp") and edit the environment_id= line to fetch the Ruby version from .rbenv-version (example below).

Today I learned about another Ruby manager, rbfu, where the author is using a similar technique with .rbfu-version.

@docwhat
docwhat / rails31init.md
Created September 3, 2011 03:01 — forked from niquola/rails31init.md
Rails 3.1 with Rspec, Factory Girl, Haml, Database Cleaner, Spork, and Guard

Install Rails 3.1

gem install rails

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile