Skip to content

Instantly share code, notes, and snippets.

@rcombs
rcombs / Output
Last active December 3, 2019 16:49
Linker visibility issue
$ objdump -t test.o | grep 4soci7details11type_holder | c++filt
0000000000005090 gw F __TEXT,__text tm soci::details::type_holder<tm>::value<tm>() const
0000000000004500 gw F __TEXT,__text std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > soci::details::type_holder<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::value<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >() const
0000000000000a40 gw F __TEXT,__text int soci::details::type_holder<int>::value<int>() const
0000000000005ac0 gw O __DATA,__const typeinfo for soci::details::type_holder<tm>
0000000000005a90 gw O __DATA,__const typeinfo for soci::details::type_holder<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >
00000000000058d8 gw O __DATA,__const typeinfo for soci::details::type_holder<int>
0000000000005886 gw O __TEXT,__const typeinfo name for soci::details::type_holder<tm>
0000
@rcombs
rcombs / gist:d836b5b83562e56d6f203a2e3aa97ecd
Created April 4, 2019 04:38
Mario 64 1-Key lag frames
LAG: 2 1
LAG: 4 17
LAG: 97 76
LAG: 99 13
LAG: 119 3
LAG: 121 3
LAG: 137 18
LAG: 171 33
LAG: 904 3
LAG: 1512 3
@rcombs
rcombs / emoji.reg
Created March 18, 2019 06:36
Twitter emoji regex
/
(?:
\ud83d
[\udc68\udc69]
)
(?:
\ud83c
[\udffb-\udfff]
)?
\u200d
gstrings: supported targets: mach-o-x86-64 elf32-bigaarch64 elf32-littleaarch64 elf64-bigaarch64 elf64-bigaarch64-cloudabi elf64-littleaarch64 elf64-littleaarch64-cloudabi mach-o-arm64 ecoff-littlealpha elf64-alpha elf64-alpha-freebsd nlm32-alpha vms-alpha vms-libtxt elf32-am33lin a.out-zero-big demo64 a.out.adobe elf32-bigarc elf32-littlearc a.out-arm-netbsd coff-arm-big coff-arm-little elf32-bigarm elf32-littlearm elf32-bigarm-symbian elf32-littlearm-symbian elf32-bigarm-vxworks elf32-littlearm-vxworks mach-o-arm pe-arm-big pe-arm-little epoc-pe-arm-big epoc-pe-arm-little pe-arm-wince-big pe-arm-wince-little pei-arm-big pei-arm-little epoc-pei-arm-big epoc-pei-arm-little pei-arm-wince-big pei-arm-wince-little elf32-avr elf32-bfin elf32-bfinfdpic b.out.big b.out.little elf32-cr16 elf32-cr16c a.out-cris elf32-cris elf32-us-cris elf32-crx elf32-d10v elf32-d30v elf32-dlx elf32-big elf32-little elf64-big elf64-little elf32-epiphany elf32-fr30 elf32-frv elf32-frvfdpic coff-h8300 elf32-h8300 elf32-h8300-linux coff
var target = 368078;
var size = 20;
var arr = new Array(size);
for (var i = 0; i < size; i++) {
arr[i] = new Array(size);
arr[i].fill(0);
}
var offset
@rcombs
rcombs / gist:0f42e186081b114a55676e4dc3106ebf
Created July 20, 2017 05:29
Matroska "Forced" flag utility
Currently, the "forced" flag's documentation describes a feature that wouldn't be particularly useful as defined, and doesn't match any implementation's behavior I know of (though if any implementation actually does overlay a forced track alongside a normal one, please let me know). I'd like to propose an updated definition of the default and forced flags:
- Default:
For audio or video, set if that track SHOULD be active if no language found matches the user preference; this can be used to specify the original content language. For subtitles, set if that track SHOULD be chosen if there are multiple tracks which match the user's language preferences. (1 bit)
- Forced:
Applies only to subtitles. Set if that track SHOULD be active during playback, even if the user's preferences would normally not enable subtitles with the selected audio stream; this can be used for tracks containing only translations of foreign-language audio or onscreen text. (1 bit)
These definitions better match the intent of the flags on
// ==UserScript==
// @name Fix Twitter
// @namespace https://gist.github.com/rcombs/
// @version 0.1
// @description stop Twitter from being a piece of ѕһіt
// @author Rodger Combs
// @match https://twitter.com/*
// @grant GM_addStyle
// @downloadURL https://gist.github.com/rcombs/dd041d75357107ef7e2b26ba077a9612/raw/fix-twitter.user.js
// ==/UserScript==
#!/usr/bin/perl -w
#
# This script was developed by Robin Barker (Robin.Barker@npl.co.uk),
# from Larry Wall's original script eg/rename from the perl source.
#
# This script is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
# Larry(?)'s RCS header:
# RCSfile: rename,v Revision: 4.1 Date: 92/08/07 17:20:30
This script is injected before </body> on some (not all!) plaintext HTTP HTML file downloads.
I'm not fucking comfortable with Comcast transparently proxying and tampering with my internet connection.
<script language="JavaScript" type="text/javascript">
// Copyright (C) 2015 Comcast Cable Communications, LLC
// Contact Us: http://customer.xfinity.com/contact-us/
// Intended use of this message is to display critical and time sensitive notifications to customers.
/*
This program is free software; you can redistribute it and/or
SECTION .data
fizz: db 'Fizz'
buzz: db 'Buzz'
num: db '00'
nl: db 0x0A
SECTION .text
global start
start: