Skip to content

Instantly share code, notes, and snippets.

View eregon's full-sized avatar

Benoit Daloze eregon

View GitHub Profile
@smarr
smarr / truffle-material.md
Last active May 14, 2024 07:48
Truffle: Languages and Material
[] ~/projects/rubyspec $ git log | grep 2015 | wc -l
1021
[] ~/projects/rubyspec $ git log | grep 2014 | wc -l
410
[] ~/projects/rubyspec $ git log | grep 2013 | wc -l
961
[] ~/projects/rubyspec $ git log | grep 2012 | wc -l
@headius
headius / 0.soft_ordering.diff
Last active September 6, 2016 13:59
Four impls of thread-safe Array#at for JRuby
diff --git a/core/src/main/java/org/jruby/RubyArray.java b/core/src/main/java/org/jruby/RubyArray.java
index 04fbeef..1c32bb39 100644
--- a/core/src/main/java/org/jruby/RubyArray.java
+++ b/core/src/main/java/org/jruby/RubyArray.java
@@ -71,6 +71,7 @@ import org.jruby.util.io.EncodingUtils;
import java.io.IOException;
import java.lang.reflect.Array;
+import java.lang.reflect.Field;
import java.util.Arrays;
@smarr
smarr / presentations.md
Last active November 25, 2016 04:53
Truffle/Graal at SPLASH'16

Truffle and Graal-related Presentations at SPLASH'16

Meta'16

  • [AST Specialisation and Partial Evaluation for Easy High-Performance Metaprogramming][7] ([PDF][7pdf])
    Chris Seaton, Oracle Labs
    Sun 30 Oct 2016, 11:30-12:00 - Meta'16

Abstract

#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
void on_signal(int sig) {
printf("\nIN handler\n");
//nothing
}
@peey
peey / _config.yml
Last active October 19, 2023 12:14
Jekyll plugin for parsing of custom variables in permalinks
# will substitute :author with the variable author in your file (also works with defaults).
permalink: /:author/:slug/
# You need to have this extra permalink_custom_vars array to tell the plugin which substitutions to make
permalink_custom_vars: ['author']
# Note that you don't have to include the supported variables in this list as jekyll takes care of that
# For a complete list of variables jekyll supports, see: https://jekyllrb.com/docs/permalinks/#template-variables
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 31, 2024 12:46
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@chenxiaolong
chenxiaolong / DellXPS15_9560_AHCI_RAID.md
Created November 27, 2017 01:33
Switching between AHCI and RAID on the Dell XPS 15 (9560)

Switching between AHCI and RAID on the Dell XPS 15 (9560)

This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) with the OEM Windows installation from the Signature Edition model.

Switching from RAID to AHCI

Switching from RAID to AHCI is significantly simpler than switching from AHCI to RAID. All that's needed is a successful boot to Safe Mode.

  1. To set the default boot mode to Safe Mode, use msconfig.exe or open an admin cmd/PowerShell window and run:
@k0kubun
k0kubun / benchmark_driver.optcarrot.log
Last active February 25, 2018 12:55
Optcarrot benchmark using benchmark_driver.gem: Intel 4.0GHz i7-4790K with 16GB memory under x86-64 Ubuntu 8 Cores
$ cat benchmark.yml
# Config for benchmark_driver.gem
type: command_stdout
name: optcarrot
command: bin/optcarrot --benchmark examples/Lan_Master.nes
metrics_type:
unit: fps
stdout_to_metrics: |
match = stdout.match(/^fps: (?<fps>\d+\.\d+)$/)
Float(match[:fps])
@eregon
eregon / precise_time.c
Last active September 22, 2019 13:44
A variant of time(1) to measure startup precisely, able to show real time in milliseconds and max RSS in MB. Moved to https://github.com/eregon/precise-time
#include <sys/time.h>
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include <spawn.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>