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/ruby | |
require "shellwords" | |
require "json" | |
if ARGV.length == 0 | |
extra_args = "" | |
elsif ARGV.length == 1 | |
extra_args = "-p #{ARGV[0]}" | |
else |
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/ruby | |
require "shellwords" | |
require "set" | |
# Generated from `libc` using the following regex: | |
# 'pub const SYS_([a-z0-9_]+): ::c_long = (\d+);' | |
# ' \2 => "\1",' | |
SYSCALLS = { | |
0 => "read", |
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/ruby | |
DEFAULT_SYSTEM_CORE_COUNT = 2 | |
USE_MLOCK_ALL = false | |
exit if ARGV.empty? | |
raise "/usr/bin/setarch not found" unless File.exist? "/usr/bin/setarch" | |
raise "/usr/bin/schedtool not found" unless File.exist? "/usr/bin/schedtool" | |
mlockall_source = <<-EOS |
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
#![allow(non_snake_case)] | |
#![allow(dead_code)] | |
use std::borrow::Borrow; | |
use std::convert::AsRef; | |
struct Y; | |
struct X { | |
y: Y |
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
/* | |
Minimal SDL2 + OpenGL3 example. | |
Author: https://github.com/koute | |
This file is in the public domain; you can do whatever you want with it. | |
In case the concept of public domain doesn't exist in your jurisdiction | |
you can also use this code under the terms of Creative Commons CC0 license, | |
either version 1.0 or (at your option) any later version; for details see: | |
http://creativecommons.org/publicdomain/zero/1.0/ |