View LibLoader.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Based on code from https://stackoverflow.com/questions/59629947/how-do-i-load-an-external-js-library-in-svelte-sapper | |
import { onMount, createEventDispatcher } from "svelte"; | |
const dispatch = createEventDispatcher(); | |
export let src; | |
export let libraryDetectionObject; | |
let script; | |
onMount(() => { |
View gist:c41d3ca7bcc19fd1090f993ae25ee01a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warning: Quoted references are deprecated | |
on .terraform/modules/slipway-network-frontend/network/main.tf 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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", "project_repository=git@github.com:minus/capua.git", "-var", "branch=master", "-var", "update_disk_link=https://www.googleapis.com/compute/v1/projects/sj-hjem-temp/zones/europe-north1-a/disks/capua-updatevm-disk", "-var", "img_name=capua-master-20191128-2137"} | |
2019/11/28 22:39:34 [DEBUG] Attempting to open CLI config file: /home/hallvord/.terraformrc |
View object-assign.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/sindresorhus/object-assign | |
/* | |
object-assign | |
(c) Sindre Sorhus | |
@license MIT | |
*/ | |
(function(){ | |
'use strict'; | |
/* eslint-disable no-unused-vars */ |
View prince-total-pages-demo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html><html> | |
<head><title>Exclude some pages from numbering</title> | |
<link rel="help" href="http://www.princexml.com/forum/topic/3492/is-it-possible-to-skip-numbering-a-named-page-group"> | |
<script type="text/javascript"> | |
(function(){ | |
// 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 |
View kuromoji-helper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kuromoji.builder({ dicPath: "node_modules/kuromoji/dict/" }).build(function (err, tokenizer) { | |
if(err)console.log(err); | |
var textNodesUnder = function(node){ // http://stackoverflow.com/questions/10730309/find-all-text-nodes-in-html-page | |
var all = []; | |
for (node=node.firstChild;node;node=node.nextSibling){ | |
if (node.nodeType==3 && !/^\s+$/.test(node.data)) all.push(node); | |
else all = all.concat(textNodesUnder(node)); | |
} | |
return all; | |
}; |
View extract_domain_name.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 www.mail.example.com |
View filter-arrows.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wc-Filter{position:relative; padding-right: 24px; | |
padding-left: 29px; | |
margin-left: -28px; | |
border-left-width: 0;} | |
.wc-Filter::before{ | |
right: -12px; | |
height: 0px; | |
display:block; | |
position: absolute; | |
padding:0; margin: 0;vertical-align: bottom;margin-top: -6px; |
View test_getconsolemessage.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import requests | |
import sys | |
import time | |
import unittest | |
# URL of SlimerJS / PhantomJS server | |
url = os.getenv('COMPATIPEDE_TAB_URL', 'http://127.0.0.1:8778') |
NewerOlder