Skip to content

Instantly share code, notes, and snippets.

@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@tdpauw
tdpauw / devops-ball-point.md
Last active January 5, 2019 20:05
Playbook of the DevOps Ball Point game

DevOps Ball Point game

This describes the playbook for running the DevOps Ball Point game as shared by John Clapham on Twitter.

The Objective

Pass as many balls as possible through the team into the paper cups.

Materials

  • something to create a wall: 2 flipcharts, a whiteboard, a projection screen or office space dividers
  • 120 balls seems to be the right amount
@imjasonh
imjasonh / markdown.css
Last active May 17, 2024 07:30
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@9to5IT
9to5IT / Logging_Functions.ps1
Last active March 20, 2023 00:47
PowerShell: Logging Functions
Function Log-Start{
<#
.SYNOPSIS
Creates log file
.DESCRIPTION
Creates log file with path and name that is passed. Checks if log file exists, and if it does deletes it and creates a new one.
Once created, writes initial logging data
.PARAMETER LogPath
@tomduckering
tomduckering / Women in DevOps.md
Last active December 15, 2015 02:19
Notes from the open space on gender diversity in DevOps at DevOpsDays London 2013.

Women in DevOps

(Proposer Notes: Whilst it's apparant that IT Operations as a field lacks diversity in many ways discussion was intentionally limited to gender. Further it's my experience that working for an employer who is explicitly targeting greater diversity, the ops end of the IT scale still suffers from being a white, male monoculture.)

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@russss
russss / graphite-jenkins.py
Created June 7, 2012 10:46
Quick script to send Jenkins successful build durations to Graphite
#!/usr/bin/env python
""" Sends Jenkins build duration statistics to Graphite. """
import requests
import json
from graphite import Graphite # This is our closed-source library but you get the idea.
JENKINS_URL='http://jenkins'
GRAPHITE_HOST='10.x.x.x'
GRAPHITE_PREFIX='jenkins.main.build_time.'
@michaelkirk
michaelkirk / show-remote-branch-info.sh
Created May 4, 2012 16:51
sort remote branches by age
#!/bin/sh
#
# Too many crusty old git branches? Run this to find likely candidates for deletion
# It lists all the remote branches and sorts them by age.
#
# Folks at pivotal shared this with me
#
#$ . show-remote-branch-info.sh
# 2012-05-04 09:42:29 -0700 4 minutes ago Ted & Bill \torigin/hey_Bill
@nickfloyd
nickfloyd / gist:1046526
Created June 25, 2011 14:11
Powershell basic authentication
//This returns a 404 not found - powershell; I expected a 401 if my creds were bad
$Url = "https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26"
$webclient = new-object system.net.webclient
$webclient.credentials = new-object system.net.networkcredential("user", "password")
$result = $webclient.DownloadString($Url)
$result
//This returns the data I want via terminal
curl -u user:password https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26
@jordansissel
jordansissel / Why JRuby.md
Created May 18, 2011 16:38
logstash, why jruby?

Long story, short: I'm totally open to supporting more rubies if possible. Details follow.

Related issue: http://code.google.com/p/logstash/issues/detail?id=37

Summary:

  • core and stdlib ruby changes violently and without notice and without backwards compatibility. I want nothing of that.
  • need a cross-ruby date library that isn't part of stdlib (see previous point) and is also good.
  • need an easy way to use multiple cpus that is cross-ruby (threads are not it)