Skip to content

Instantly share code, notes, and snippets.

View wilkie's full-sized avatar
☠️
screaming into the void

wilkie wilkie

☠️
screaming into the void
View GitHub Profile
@wilkie
wilkie / builtins.c
Created May 3, 2012 06:25 — forked from avdi/builtins.c
C builtins
void strcpy(char* dest, char* src) {
src = "aaa";
while(*dest++ = *src++);
}
int main(void) {
char buff[64];
strcpy(buff, "Look ma, ");
strcat(buff, "no #includes");
printf(buff);
@wilkie
wilkie / opengl-transparency-demo.cpp
Created September 5, 2012 20:46
Rendering directly to a composited window in vista+ with opengl.
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <windowsx.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <dwmapi.h>
#pragma comment (lib, "opengl32.lib")
@wilkie
wilkie / experiment.rb
Created November 19, 2012 23:51
Code to produce a probability distribution of how likely a gender breakdown in conference speakers is, and also to experiment to produce the result
# This program will select at random a set of speakers and look at the gender breakdown given 20% women
total_speakers = 15
percentage_of_women = 0.25
hist, list, results = {}, [], []
(1000 * (1 - percentage_of_women)).floor.times{list << 0}
(1000 * percentage_of_women).floor.times{list << 1}
@wilkie
wilkie / diversity_links.md
Last active June 15, 2021 16:49
Some links devoted to diversity discussion.

For uri-identifiers that are non-webfinger identifiers, you'll see people say @wilkie.fyi and this will mean it does discovery by looking at that page and discovering via content negotiation and/or links. This is useful for people who are creating content on sites that doesn't implement webfinger, for instance a blogging or photo posting site. They'll add Link tags instead and use a full URI. Basically: it is eas(ier) to syndicate that content without having to own the domain, but hard to add something to .well-known.

I might be @example.org/wilkie or even, dare I say, @mastodon.social/@wilkie but it will still look like @wilkie to humans. The same methods you are using to disambiguate, but hide the details to human beings, will still work here.

To disambiguate, in AS2, mentions and "hashtags" etc can be parsed universally using tag:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "name": "A thank-you note",
@wilkie
wilkie / keybase.md
Created September 28, 2017 22:16
keybase proof

Keybase proof

I hereby claim:

  • I am wilkie on github.
  • I am wilkie (https://keybase.io/wilkie) on keybase.
  • I have a public key whose fingerprint is 738A 1D5A FDF6 8DC2 0858 567D C2A2 2FFD 2510 664B

To claim this, I am signing this object:

http://www.daveramsey.com/blog/20-things-the-rich-do-every-day

I love lists! I especially love those that involve both a selection bias AND a confirmation bias!

I especially love the paragraph immediately after the list talking about how the Christian bible discusses how we should "live on less than we make" and instructs us that we should be "saving money and thereby building wealth". What?! God wants me to not be poor?! God should provide me with better health insurance options, a higher minimum wage, more inclusive workers' rights, and better, cheaper access to healthy food options.

  1. 70% of wealthy eat less than 300 junk food calories per day. 97% of poor people eat more than 300 junk food calories per day. 23% of wealthy gamble. 52% of poor people gamble.

The wealthy have better and more convenient access (through wealth and physical location) to large grocery stores.

@wilkie
wilkie / compile.sh
Last active December 21, 2015 01:28
Rust testing micro-framework based off of typical behavior testing frameworks that's a little rough around the edges, but a good example of the power of rust macros.
rustc test.rs && ./test
@wilkie
wilkie / Gemfile
Created July 21, 2013 09:18
Using timezones in Ruby with simply the tzinfo database.
source 'https://rubygems.org'
gem "tzinfo"
gem "tzinfo-data"
@wilkie
wilkie / thing.pyrb
Last active December 17, 2015 13:19
Prints ruby if executed by ruby, python if executed by python
x\
=begin ="python";y\
=end \
="ruby\n";print(x)