Skip to content

Instantly share code, notes, and snippets.

View heftig's full-sized avatar
🦄
Horsing around

Jan Alexander Steffens heftig

🦄
Horsing around
View GitHub Profile
We couldn’t find that file to show.
[ +0.000013] WARNING: CPU: 5 PID: 205 at fs/btrfs/extent-tree.c:2927 btrfs_run_delayed_refs+0x262/0x290 [btrfs]()
[ +0.000001] BTRFS: Transaction aborted (error -17)
[ +0.000001] Modules linked in: sha256_ssse3 sha256_generic hmac drbg ansi_cprng ctr ccm rfcomm ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter joydev mousedev bnep input_leds psmouse serio_raw atkbd tpm_infineon libps2
[ +0.000031] tpm_tis ac processor sch_fq_codel usbip_host usbip_core snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_timer snd soundcore cuse fuse nfs lockd grace sunrpc fscache tpm_rng rng_core tpm vhba(C) ip_tab
[ +0.000034] CPU: 5 PID: 205 Comm: btrfs-transacti Tainted: G WC 4.4.0-2-zen #1
[ +0.000001] Hardware name: Notebook W740SU /W740SU , BIOS 4.6.5 09/11/2014
[ +0.000001] 0000000000000000 00000000c95b88e4 ffff8804090a7cf0 ffffffff812e1c69
[ +0.000002] ffff8804090a7d38 ffff8804090a7d28
diff --git i/Rakefile w/Rakefile
index d1bbfa6..ecf10bb 100644
--- i/Rakefile
+++ w/Rakefile
@@ -52,7 +52,7 @@ end
load_configuration
-unless BUILD_CONFIG[:config_version] == 179
+unless BUILD_CONFIG[:config_version] == 180
def caseperm(str, num)
str.each_char.map.with_index do |c,i|
if num[i] == 0
c.downcase
else
c.upcase
end
end.join
end
class Hash
def map_value
each_pair.with_object({}) { |(key, value), result| result[key] = yield value }
end
def map_key
each_pair.with_object({}) { |(key, value), result| result[yield key] = value }
end
def map_pair(&blk)
escape_char /
comment_char %
% Locale for English locale in Germany, using period decimal seperator
LC_IDENTIFICATION
title "English locale for Germany"
source ""
address ""
contact ""
email ""
require 'benchmark'
class A
attr_accessor :foo
def initialize
@foo = 0
end
def test_direct
class ErrorRounder
def initialize
@error = 0.0
end
def round(x, n=0)
out = (x - @error).round(n)
@error += out - x
out
end
def replace_line_in_file(old,new,file)
File.open(file) do |f|
File.open(file + ".new", "w") do |f2|
f.each_line do |line|
f2.puts line.gsub(old, new)
end
end
end
File.rename(file + ".new", file)
end

I have an example YAML file:

---
- foo:
    - 1
    - 2
    - 3

- bar: test123
- lol: test456