Skip to content

Instantly share code, notes, and snippets.

View bodsch's full-sized avatar

Bodo Schulz bodsch

View GitHub Profile
@koduki
koduki / fontconfig.properties
Created January 7, 2012 18:47 — forked from msnoigrs/fontconfig.properties
fontconfig.properties for jre on arch linux
#
# For Arch Linux
#
# Version
version=1
# Component Font Mappings
# Benchmarking for http://stackoverflow.com/questions/9538090
require 'benchmark'
require 'active_support/core_ext'
events = [{id:2, start:"3:30",break:30,num_attendees:14},{id:3, start:"3:40",break: 40,num_attendees:4},{id:4, start:"4:40",break:10,num_attendees:40}]
time = Benchmark.bm(10) do |bm|
bm.report("amarshall 1") do
10000.times do
@tuzz
tuzz / github.css
Last active April 23, 2024 15:47
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@paveq
paveq / gist:5684255
Last active November 23, 2022 02:08
Local kickstart with virt-install

Minimal kickstart installation locally

kickstart file

keyboard fi
lang en_US.UTF-8
timezone --utc Europe/Helsinki
zerombr
install

reboot

@jjmaestro
jjmaestro / whisper-calculator.py
Last active November 26, 2019 07:13
whisper-calculator.py: Calculates the size of the whisper storage for the given retention (in frequency:history format)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def archive_to_bytes(archive):
def to_seconds(s):
SECONDS_IN_A = {
's': 1,
'm': 1 * 60,
'h': 1 * 60 * 60,
@rxaviers
rxaviers / gist:7360908
Last active May 6, 2024 03:49
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jmervine
jmervine / nginx.conf
Last active March 19, 2020 06:17
Nginx config to test regex.
# Usage:
#
# Start with:
#
# sudo /use/local/sbin/nginx -c /path/to/this/nginx.conf
#
# Tail logs:
#
# $ sudo tail -f /tmp/access.log /tmp/error.log /tmp/match.log
#
@jsynowiec
jsynowiec / thinkpad-dock
Last active October 4, 2021 07:21
[Thinkpad Series 3 docking station scripts] Thinkpad "docking scripts" for Series 3 docking station enabling or disabling both external displays on acpi events (https://www.kernel.org/doc/Documentation/laptops/thinkpad-acpi.txt). Only one pair of events should be used - check which ones (IBM/LENOVO/HKEY) acpid daemon receives. #thinkpad #linux #…
# /etc/acpi/events/thinkpad-dock
# This is called when the Thinkpad docks in a series 3 docking station
event=ibm/hotkey HKEY 00000080 00004010
action=/etc/acpi/thinkpad-dock.sh
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@soarez
soarez / ca.md
Last active May 3, 2024 00:04
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.