Skip to content

Instantly share code, notes, and snippets.

View skade's full-sized avatar
💭
Bringing Rust to safety critical.

Florian Gilcher skade

💭
Bringing Rust to safety critical.
View GitHub Profile
@skade
skade / Current running patreons
Last active July 26, 2017 20:59
Currently running patreons in the Rust community
russia, translation and website hosting: https://www.patreon.com/mkpankov
newrustacean: https://www.patreon.com/newrustacean
tomaka: https://www.patreon.com/tomaka
QuietMisdreavus: https://www.patreon.com/QuietMisdreavus
trait Query<'a, 'b: 'a, X: 'b, Y: 'a> {
fn execute(&self, f: X) -> Y;
}
#[derive(Default)]
struct ToBeQueried {
inner: String
}
struct GetInnerSlice;
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
def f0r(init, condition, step, &block)
var, step = *step
while condition[var]
eval "i = #{var}", block.binding
yield
var = step[var]
end
end
fn main() {
let mut test = "foobar".chars().
let mut test = test.skip(2);
println!("{}", test.as_str());
}
@skade
skade / links_and_pointers.md
Last active February 12, 2016 17:15
Rust links and (unique) Pointers
@skade
skade / require_mem.stp
Created January 27, 2014 23:48
This systemtap probe measures memory cost per require. Be aware that require sum up, so subrequires form the sum of the initial require.
global before;
global after;
probe process("ruby").mark("require__entry")
{
module = kernel_string($arg1)
mem = proc_mem_size_pid(pid())
before [module] = mem;
}
@skade
skade / gist:8633489
Last active January 4, 2016 14:19 — forked from tmm1/gist:7998799
$ cat ruby_mcache.stp
probe process("/usr/bin/ruby").mark("method__cache__clear")
{
module = kernel_string($arg1)
if ($arg2)
file = kernel_string($arg2)
else
file = "<internal>"
line = $arg3
printf("%s(%d) %s %s:%d cleared `%s'\n", execname(), pid(), $$name, file, line, module)
@skade
skade / (slash)etc(slash)hosts
Last active January 2, 2016 02:19
Get Facebook off your internet
#ignore stupid sites
127.0.0.1 techcrunch.com
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 static.ak.fbcdn.net
127.0.0.1 www.static.ak.fbcdn.net
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
@skade
skade / thoughts_on_microrb.md
Last active December 31, 2015 17:19
A few thoughts on microrb

Hi microrbes,

I gave the issue of "what would you like from microrb" a few thoughts that I'd like to write down here:

I find "building a collection" important, but that is one curated task for one or two persons. Still, I think this is selling the concept short.

I think there are a few things holding people off from using microlibraries:

  1. Inconsistent or lack documentation