Skip to content

Instantly share code, notes, and snippets.

View LibLoader.svelte
// Based on code from
import { onMount, createEventDispatcher } from "svelte";
const dispatch = createEventDispatcher();
export let src;
export let libraryDetectionObject;
let script;
onMount(() => {
View gist:c41d3ca7bcc19fd1090f993ae25ee01a
Warning: Quoted references are deprecated
on .terraform/modules/slipway-network-frontend/network/ line 21, in resource "google_dns_record_set" "default":
21: provider = "google.dnseditor"
In this context, references are expected literally rather than in quotes.
Terraform 0.11 and earlier required quotes, but quoted references are now
deprecated and will be removed in a future version of Terraform. Remove the
quotes surrounding this reference to silence this warning.
View crash.log
This file has been truncated, but you can view the full file.
2019/11/28 22:39:34 [INFO] Terraform version: 0.12.16
2019/11/28 22:39:34 [INFO] Go runtime version: go1.12.13
2019/11/28 22:39:34 [INFO] CLI args: []string{"/home/hallvord/.local/bin/terraform", "apply", "-var", "service_account_file=/home/hallvord/repos/capua/config/local-secrets/sj-hjem-temp-9d5395117d01.json", "-var", "service_account_file_dns=/home/hallvord/repos/minus-test-dns-76c6ab29b0b5.json", "-var", "project_appname=capua", "-var", "target_environment=staging", "-var", "google_project_name=sj-hjem-temp", "-var", "google_dns_project_name=minus-test-dns", "-var", "google_region=europe-north1", "-var", "google_zone=europe-north1-a", "-var", "", "-var", "branch=master", "-var", "update_disk_link=", "-var", "img_name=capua-master-20191128-2137"}
2019/11/28 22:39:34 [DEBUG] Attempting to open CLI config file: /home/hallvord/.terraformrc
hallvors / object-assign.js
Created Feb 20, 2017
Slightly modified object-assign code to set Object.assign directly rather than being a node module
View object-assign.js
(c) Sindre Sorhus
@license MIT
'use strict';
/* eslint-disable no-unused-vars */
public class MakePDF {
* Instantiates a Prince object
public static class MessageListener implements com.princexml.PrinceEvents{
public void onMessage(String msgType,
String msgLocation,
View AlternatePageNumbers.htm
<!DOCTYPE html><html>
<head><title>Exclude some pages from numbering</title>
<link rel="help" href="">
<script type="text/javascript">
// This list can be customized by hand or auto-generated
var pages = {"3":1,"4":2,"5":3,"6":4,"8":5,"9":6}
// If you wish to auto-generate the list, add
hallvors / kuromoji-helper.js
Last active Sep 23, 2016
Helper script for better Japanese line wrapping, using Kuromoji tokenizer library
View kuromoji-helper.js
kuromoji.builder({ dicPath: "node_modules/kuromoji/dict/" }).build(function (err, tokenizer) {
var textNodesUnder = function(node){ //
var all = [];
for (node=node.firstChild;node;node=node.nextSibling){
if (node.nodeType==3 && !/^\s+$/.test( all.push(node);
else all = all.concat(textNodesUnder(node));
return all;
hallvors /
Created Mar 21, 2016
Using tldextract to remove www. safely and extract the domain name and its public suffix
def extract_domain_name(url):
'''Extract the domain name from a given URL'''
prefix_blacklist = ['www']
parts = tldextract.extract(url)
# We want to drop any prefixes mentioned in the blacklist
# They typically do not add information that's useful to
# distinguish the "identity" of a specific site
# Sometimes the blacklisted domain is part of subdomain,
# for example when parsing
hallvors / filter-arrows.css
Created Dec 12, 2015
Turning the "filter" buttons on into arrows (sort of)
View filter-arrows.css
.wc-Filter{position:relative; padding-right: 24px;
padding-left: 29px;
margin-left: -28px;
border-left-width: 0;}
right: -12px;
height: 0px;
position: absolute;
padding:0; margin: 0;vertical-align: bottom;margin-top: -6px;
hallvors /
Created Dec 8, 2015
Boar test for the getconsolemessage command
import json
import os
import requests
import sys
import time
import unittest
# URL of SlimerJS / PhantomJS server
url = os.getenv('COMPATIPEDE_TAB_URL', '')
You can’t perform that action at this time.