Skip to content

Instantly share code, notes, and snippets.

Eirik Sletteberg eirslett

Block or report user

Report or block eirslett

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eirslett
eirslett / PdfPreview.jsx
Created Sep 26, 2018
React component for previewing PDF
View PdfPreview.jsx
import React, {Component, PropTypes} from 'react';
require('pdfjs-dist');
export default
class PdfPreview extends Component {
static propTypes = {
file: PropTypes.object
};
constructor(props) {
View gist:4edff1057666c5ec1d8a1e14b7d91962
### Keybase proof
I hereby claim:
* I am eirslett on github.
* I am eirslett (https://keybase.io/eirslett) on keybase.
* I have a public key whose fingerprint is 1793 5F3D 5F71 8537 ADFF D86E 0D69 DA94 A12E B985
To claim this, I am signing this object:
View keybase.md

Keybase proof

I hereby claim:

  • I am eirslett on github.
  • I am eirslett (https://keybase.io/eirslett) on keybase.
  • I have a public key ASCsAaaCzbtCupCpiMurUDoJ75Mrz8aaJ1MEJE7DxJ2tewo

To claim this, I am signing this object:

@eirslett
eirslett / index.html
Created Oct 4, 2017
Webkit bug report
View index.html
<!doctype html>
<html>
<head>
<title>Video bug report</title>
</head>
<body>
<script>
const video = document.createElement('video')
video.src = 'http://techslides.com/demos/sample-videos/small.mp4'
video.addEventListener('error', ev => console.log('Expected event (video playback error)', ev))
View zipkin aggregate mysql dump
INSERT INTO zipkin_dependencies (dlid, start_ts, end_ts) VALUES (1, 0, 1421053208373000);
INSERT INTO zipkin_dependency_links (dlid, parent, child, m0, m1, m2, m3, m4) VALUES (1, 'Nullam', 'Lacus', 306,3251.6339869281,128359624183.01,29586955192405000,7.8465726336595e+21);
INSERT INTO zipkin_dependency_links (dlid, parent, child, m0, m1, m2, m3, m4) VALUES (1, 'Risus', 'Fermentum', 1,67000,0,0,0);
INSERT INTO zipkin_dependency_links (dlid, parent, child, m0, m1, m2, m3, m4) VALUES (1, 'Et', 'Est', 366,8232.2404371585,531713259562.84,269034340455940000,1.5647745270687e+23);
INSERT INTO zipkin_dependency_links (dlid, parent, child, m0, m1, m2, m3, m4) VALUES (1, 'Sed', 'Consequat', 7579,2980.0765272463,6469953991555.6,8366609362916100000,1.2067652371022e+25);
INSERT INTO zipkin_dependency_links (dlid, parent, child, m0, m1, m2, m3, m4) VALUES (1, 'Condimentum', 'Turpis', 2974,5448.8903833221,75899027731338,659770849769040000000,5.7436125647717e+27);
INSERT INTO zipkin_dependency_links (dlid, parent, child, m0,
@eirslett
eirslett / scenario1
Created Mar 24, 2013
Examples for #THRIFT-1871
View scenario1
// === Scenario 1: Today's Thrift, no null-safety ===
// IDL file
User {
1: i32 id;
2: optional i32 born;
3: string name;
}
UserService {
User getUserById(1: i32 id);
You can’t perform that action at this time.