Skip to content

Instantly share code, notes, and snippets.

#[derive(Debug)]
struct Person<'a> {
first_name: &'a str,
last_name: &'a str,
}
fn foo1<'bar_lifetime>(bar: &'bar_lifetime str) -> &'bar_lifetime str {
let a = "aa";
window.jQuery(function accordion($) {
var $root = $('html, body');
var ANIMATION_SPEED = 300;
var HEADER_HEIGHT_TALL = 220;
var HEADER_HEIGHT_SMALL = 70;
var SMALL_HEADER_THRESHHOLD = 939;
var scrollTo = function (offsetTop) {
@killercup
killercup / bytes-throughput.csv
Created November 30, 2015 10:16
hash-rs benchmark
bytes horner sip farm xx fnv
1 33 33 18 24 500
2 66 66 37 44 666
4 129 117 66 105 800
8 258 228 115 190 727
16 470 390 186 326 551
32 680 603 157 551 426
64 1103 853 231 1000 349
128 1580 1057 329 1620 317
256 2169 1190 423 2392 309
@killercup
killercup / atom-custom-styles.less
Created November 3, 2015 12:50
In Atom 1.1, font features like ligatures finally work!
atom-text-editor {
// -> === /= => >>>
-webkit-font-feature-settings: "liga" on, "calt" on;
//-webkit-font-smoothing: antialiased;
// text-rendering: optimizeLegibility;
&::shadow {
.meta.brace,
.punctuation.terminator {
opacity: 0.4;

Intl.js on Node 4.2

$ node --version
v4.2.1
$ npm --version
3.3.8
$ npm ls
intltest@1.0.0 /Users/pascal/Downloads/intltest
├── intl@1.0.1
@killercup
killercup / min-max.rs
Created September 30, 2015 12:02 — forked from anonymous/playground.rs
Rust min! and max! macros
macro_rules! max {
($x:expr) => ( $x );
($x:expr, $($xs:expr),+) => {
{
use std::cmp::max;
max($x, max!( $($xs),+ ))
}
};
}

Symbol Pronounciation

[...] each glyph has its own monosyllabic name, designed to be pronounced quickly in combination with another glyph to form a rune name. As languages are often read-aloud, this saves the programmer from having to say "dollar sign, question mark"--"bucwut" is much more compact.

– [Hoon documentation][0]

symbol pronounciation
| bar
$ buc
<http://www.wikidata.org/ontology#propertyStatementLinkage> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
<http://www.w3.org/ns/prov#wasDerivedFrom> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
<http://www.wikidata.org/ontology#propertyType> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
<http://www.wikidata.org/ontology#timePrecision> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
<http://www.wikidata.org/ontology#propertySimpleClaim> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
<http://www.wikidata.org/ontology#upperBound> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
<http://www.wikidata.org/ontology#gcPrecision> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/o
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1348.17">
<style type="text/css">
p.p2 {margin: 0.0px 0.0px 20.0px 0.0px; line-height: 30.0px; font: 20.0px Arial; color: #333333; -webkit-text-stroke: #333333}
@killercup
killercup / Side Notes.markdown
Created September 10, 2015 15:05
Side Notes

Side Notes

Automatic side notes for links (showing their titles) and footnote texts.

A Pen by Pascal on CodePen.

License.