This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# a code for an article at https://www.reddit.com/r/RimWorld/comments/fwoi36/using_bisection_power_of_git_to_identify_a_buggy/ | |
ORIG_CONFIG_FNAME = "ModsConfig.xml.orig" | |
CONFIG_FNAME = "ModsConfig.xml" | |
ALWAYS_ADD = [] | |
ALWAYS_ADD << 'brrainz.harmony' | |
ALWAYS_ADD << 'ludeon.rimworld' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include <sys/fcntl.h> | |
#include <mdbm/mdbm.h> | |
#include <mdbm/mdbm_handle_pool.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <thread> | |
#include <iostream> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color #0: 0b 41 77 |.Aw| used 4067089 times | |
color #1: ff b1 a2 |...| used 7200 times | |
color #2: 0b 41 77 |.Aw| | |
color #3: ff b1 a2 |...| | |
color #4: 0b 41 77 |.Aw| | |
color #5: ff 5b b3 |.[.| used 9000 times | |
color #6: 0b 41 77 |.Aw| | |
color #7: ff 5b b3 |.[.| | |
color #8: 0b 41 77 |.Aw| | |
color #9: ff 5b b3 |.[.| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color #0: 0b 41 77 |.Aw| used 4067089 times | |
color #1: ff b1 a2 |...| used 7200 times | |
color #2: 0b 41 77 |.Aw| | |
color #3: ff b1 a2 |...| | |
color #4: 0b 41 77 |.Aw| | |
color #5: ff 5b b3 |.[.| used 9000 times | |
color #6: 0b 41 77 |.Aw| | |
color #7: ff 5b b3 |.[.| | |
color #8: 0b 41 77 |.Aw| | |
color #9: ff 5b b3 |.[.| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#coding: binary | |
require 'zpng' | |
require 'sugar_png' | |
require 'pp' | |
# !!! convert gif file to png first | |
# will get 8 frames | |
images = Dir["task*.png"].sort.map{ |fname| ZPNG::Image.load(fname) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
orig: 512M eventlogs file | |
gzip 51M 10s | |
bzip2 25M 120s | |
xz 15M 150s | |
pixz 16M 15s | |
pixz -7 15M 15s !!! | |
pixz -8 14M 22s | |
pixz -9 13M 40s | |
pxz 16M 18s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
N = 100000 | |
s = "foobarbaz" | |
@results = [] | |
SRC = File.readlines(__FILE__) | |
print "[.]" | |
def bench title = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#coding: binary | |
# | |
# script for decoding JPG / DOC / XLS / etc files that were encoded with | |
# Trojan.Siggen3.35000 | |
# Trojan.Dropper-31300 | |
# | |
# | |
# some useful links: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# this tool is similar to "git bisect" one, but for specs. | |
# it tries to find what spec from list of specs breaks execution of one specified spec. | |
# | |
# see more at http://zed.0xff.me/2010/01/28/rspec-bisect | |
# | |
# usage example: | |
# ./rspec-bisect.rb spec/**/*_spec.rb spec/controllers/spaces/tickets_controller_spec.rb | |
# [.] rspec runner: ./script/spec |