Skip to content

Instantly share code, notes, and snippets.

View tkbremnes's full-sized avatar

Trond Kjetil tkbremnes

View GitHub Profile
@tkbremnes
tkbremnes / index.html
Created December 4, 2018 13:19 — forked from gudmundurarnar/index.html
Chromium vanilla extension
<!DOCTYPE html>
<html>
<body>
<webview src="http://sau.no"></webview>
</body>
</html>
@tkbremnes
tkbremnes / beersmith-grainlist-parser.js
Last active October 12, 2017 06:00
Simple scraper for the grain list found on beersmith.com
// http://beersmith.com/Grains/Grains/GrainList.htm
var table = document.querySelector("#table2");
var rows = table.querySelectorAll("tr");
var result = [];
rows.forEach((row, index) => {
if (index === 0) {

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@tkbremnes
tkbremnes / createReactComponent.js
Last active May 29, 2016 17:43
Personal React createComponent script, cuts down on the boilerplate code I need to write.
"use strict";
const fs = require('fs');
if (!process.argv[2]) {
// TODO: make it possible to create a name here
throw new Error("No component name");
}
const componentName = process.argv[2];
@tkbremnes
tkbremnes / index.html
Created June 10, 2014 13:37
Link to API script
<script src="http://iswebrtcready.appear.in/apiv2.js"></script>
@tkbremnes
tkbremnes / index.html
Created June 10, 2014 13:36
Example of embedded room with randomly generated name
<html>
<body>
<h1>My awesome service</h1>
<button onclick="createRoom()">Create room</button>
<iframe id="appearin-room"></iframe>
<script>
// create the room on button press
window.createRoom = function () {
@tkbremnes
tkbremnes / randomRoomNameGenerator.js
Last active August 29, 2015 14:02
Random room name generator
var randomRoomNameGenerator = function () {
// predefine the alphabet used.
var alphabet = 'qwertyuiopasdfghjklzxcvbnm1234567890';
// set the length of the room name
var roomNameLength = 30;
// initialize the room name as an empty string
var roomName = '';
@tkbremnes
tkbremnes / isAppearinCompatible.js
Created June 10, 2014 12:58
Appear.in compatibility test
API.isAppearinCompatible(function (data) {
// the call was successful
window.console.log(data);
}, function (error) {
// the call was unsuccessful
window.console.log(error);
});
@tkbremnes
tkbremnes / index.html
Last active August 29, 2015 14:02
Appear.in embedding with webRTC feature detection
<html>
<body>
<h1>My awesome service</h1>
<p>Is appear.in compatible? <span id="compatibility-test-result">Maybe</span></p>
<button id="create-room-button">Create room</button>
<iframe id="appearin-room"></iframe>
@tkbremnes
tkbremnes / dabblet.css
Created January 31, 2014 11:01
Untitled
.video {
background: #eee;
width: 600px;
height: 400px;
position: relative;
margin: 5px;
border: 1px solid #ccc;
box-shadow: 0 0 7px #aaa;
overflow: hidden;
}