Skip to content

Instantly share code, notes, and snippets.

View bernd's full-sized avatar

Bernd Ahlers bernd

View GitHub Profile
@bernd
bernd / Bootable Mac ISO with Linux.md
Created October 3, 2023 08:33 — forked from coolaj86/Bootable Mac ISO with Linux.md
Create Bootable MacOS ISO from Apple's Free PKG

PWM fan control in Linux with a Gigabyte Aorus motherboard

  • install lm-sensors with your package manager

sensors

If it won't show any fan/speed, continue

sensor-detect

@bernd
bernd / git-pull-request.md
Created March 25, 2013 09:15 — forked from piscisaureus/pr.md
Fetch pull request branches

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:

@bernd
bernd / gist:b291794b6d2f6a8b8eba
Created August 1, 2014 13:30
Compare deb and rpm versions
@bernd
bernd / gitlab.pp
Last active October 21, 2016 13:34
Quick & dirty puppet manifest to install GitLab
# Gitlab installation via puppet on Debian/Ubuntu (quick & dirty)
#
# Based on https://github.com/gitlabhq/gitlabhq/blob/stable/doc/install/installation.md
#
# Tested on Ubuntu 12.04.
#
# Run it:
# $ apt-get install puppet
# $ puppet apply puppet.pp
#
@bernd
bernd / fpm-cookery-rails-app.rb
Created January 21, 2014 22:18
Simple example to package a Rails app with fpm-cookery. (missing some setup for permissions, etc)
class RailsApp < FPM::Cookery::Recipe
description 'A rails app'
name 'my-rails-app'
version '1.0'
source '/tmp/foo', :with => :git
def build
gemhome = Pathname.pwd.join('.gemhome').to_s
@bernd
bernd / array-bench.rb
Created October 8, 2013 07:59
Benchmark Array vs. ThreadSafe::Array
require 'thread'
require 'thread_safe'
require 'benchmark'
core = []
ts = ThreadSafe::Array.new
mutex = Mutex.new
iterations = 5_000
threads = 1000
@bernd
bernd / tar.rb
Created September 16, 2013 16:45 — forked from sinisterchipmunk/LICENSE
require 'rubygems'
require 'rubygems/package'
require 'zlib'
require 'fileutils'
module Util
module Tar
# Creates a tar file in memory recursively
# from the given path.
#
@bernd
bernd / jruby-startup-tuning.txt
Created September 5, 2013 14:19 — forked from BanzaiMan/gist:6450251
JRuby startup tuning (TieredCompilation)
$ jruby -v
jruby 1.7.5.dev (1.9.3p392) 2013-09-04 090d5dd on Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15 [darwin-x86_64]
$ time jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xverify:none -e 'require "rails"'
jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xverify:none -e 5.18s user 0.47s system 136% cpu 4.142 total
$ time jruby -e 'require "rails"'
jruby -e 'require "rails"' 14.60s user 0.44s system 202% cpu 7.444 total