Skip to content

Instantly share code, notes, and snippets.

View eirslett's full-sized avatar
🏠
Working from home

Eirik Sletteberg eirslett

🏠
Working from home
View GitHub Profile
@eirslett
eirslett / PdfPreview.jsx
Created September 26, 2018 09:09
React component for previewing PDF
import React, {Component, PropTypes} from 'react';
require('pdfjs-dist');
export default
class PdfPreview extends Component {
static propTypes = {
file: PropTypes.object
};
constructor(props) {
### 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:
@eirslett
eirslett / keybase.md
Created January 8, 2018 13:56
Keybase proof

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 October 4, 2017 12:39
Webkit bug report
<!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))
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 March 24, 2013 20:13
Examples for #THRIFT-1871
// === 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);