Skip to content

Instantly share code, notes, and snippets.

View GwynethLlewelyn's full-sized avatar
👩
Learning Go

Gwyneth Llewelyn GwynethLlewelyn

👩
Learning Go
View GitHub Profile
@GwynethLlewelyn
GwynethLlewelyn / html2text-largetable-test.go
Last active August 13, 2017 22:18
Large table test for html2text
package main
import (
"fmt"
"github.com/jaytaylor/html2text"
)
func main() {
tableHTML := `<div class="table-responsive"><table class="table table-striped table-bordered table-hover"><caption>Population for agent 'Bot Controller - Semistupid Bot' [generation 2] after calculating fitness and ordering by fitness follows:</caption><thead><tr><th>Pop #</th><th>Fitness</th><th>Chromossomes</th></tr></thead><tbody>
<tr><td>0</td><td>817.7478</td><td>(70, 130, 22)<br>Distance: 1.0133<br>Obstacle: 0.1244<br>Angle: 0.0000<br>Smoothness 0.0000</td><td>(97, 130, 22)<br>Distance: 26.6781<br>Obstacle: 0.1173<br>Angle: 0.0000<br>Smoothness -27.5169</td><td>(97, 132, 22)<br>Distance: 26.6864<br>Obstacle: 0.1066<br>Angle: 1.5708<br>Smoothness -2.0206</td><td>(98, 129, 22)<br>Distance: 27.7276<br>Obstacle: 0.1252<br>Angle: -1.2490<br>Smoothness 2.0170</td><td>(102, 131, 22)<br>Distance: 31.6631<br>Obstacle: 0.1032<br>Angle: 0.4636<br>Smoothness -6.0720</td><td>(106, 132, 22)<br>Distance: 35.6800<br>Obstacle: 0.0000<br>An
@GwynethLlewelyn
GwynethLlewelyn / foldmag-pt_PT.po
Created August 20, 2017 23:28
Translation for Magpress Foldmag
msgid ""
msgstr ""
"Project-Id-Version: foldmag\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-17 02:37+0800\n"
"PO-Revision-Date: \n"
"Last-Translator: Gwyneth Llewelyn <gwyneth.llewelyn@gwynethllewelyn.net>\n"
"Language-Team: Gwyneth Llewelyn <gwyneth.llewelyn@gwynethllewelyn.net>\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
~/go/src$ git -c core.sshCommand="ssh -vvvT" clone git@autonomy.gwynethllewelyn.net:GwynethLlewelyn/gosl-basics.git
17:01:38.040501 git.c:328 trace: built-in: git 'clone' 'git@autonomy.gwynethllewelyn.net:GwynethLlewelyn/gosl-basics.git'
Cloning into 'gosl-basics'...
17:01:38.051642 run-command.c:626 trace: run_command: 'ssh -vvvT' 'git@autonomy.gwynethllewelyn.net' 'git-upload-pack '\''GwynethLlewelyn/gosl-basics.git'\'''
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/gwyneth/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "autonomy.gwynethllewelyn.net" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to autonomy.gwynethllewelyn.net [176.31.245.207] port 22.
This is using sshsrv:
$ ./sshsrv -v -l git git.gwynethllewelyn.net
Found 1 SRV record(s) for _ssh._tcp.git.gwynethllewelyn.net.
Record 0: 1 1 22 autonomy.gwynethllewelyn.net.
Target for git.gwynethllewelyn.net is autonomy.gwynethllewelyn.net:22
command: /usr/bin/ssh -p 22 -v -l git autonomy.gwynethllewelyn.net
Connecting to autonomy.gwynethllewelyn.net:22
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/gwyneth/.ssh/config
@GwynethLlewelyn
GwynethLlewelyn / pydio-cells-context-menu.html
Last active May 25, 2019 18:49
Pydio Cells Context Menu
<div class="menu-positioner" style="color: rgba(0, 0, 0, 0.87); background-color: rgb(255, 255, 255); transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; box-sizing: border-box; font-family: Roboto, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 10px, rgba(0, 0, 0, 0.23) 0px 3px 10px; border-radius: 2px; bottom: 0px; left: 0px; right: 0px; height: 200px; z-index: 1000; overflow-y: auto;">
<div role="presentation" style="z-index: 1000;">
<div display="right" role="menu" style="padding: 8px 0px; display: table-cell; user-select: none; width: 600px;">
<div>
<div>
<div style="margin-left: 0px; padding: 0px 72px 0px 16px; position: relative;">
<div>
Download
</div>
</div>
<div class="menu-positioner" style="color: rgba(0, 0, 0, 0.87); background-color: rgb(255, 255, 255); transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; box-sizing: border-box; font-family: Roboto, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 6px, rgba(0, 0, 0, 0.12) 0px 1px 4px; border-radius: 2px; top: 2px; left: 542px; z-index: 1000;">
<div role="presentation" style="z-index: 1000;">
<div display="right" role="menu" style="padding: 16px 0px; display: table-cell; user-select: none; width: 250px;">
<div>
<div>
<div style="margin-left: 0px; padding: 0px 64px 0px 24px; position: relative;">
<div>
Download
</div>
</div>
@GwynethLlewelyn
GwynethLlewelyn / keybase.md
Created August 19, 2020 22:14
Keybase proof of my public PGP key

Keybase proof

I hereby claim:

  • I am GwynethLlewelyn on github.
  • I am gwynethllewelyn (https://keybase.io/gwynethllewelyn) on keybase.
  • I have a public key whose fingerprint is CE8A 6006 B611 850F 1275 72BA D93E AA3D C4B3 E1CB

To claim this, I am signing this object:

@GwynethLlewelyn
GwynethLlewelyn / Nord.spTheme
Created May 4, 2021 18:42
Nord theme for Sequel Ace
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>background</key>
@GwynethLlewelyn
GwynethLlewelyn / functions.php
Last active May 27, 2021 01:25
Minimalistic code to add rel=canonical links on HTML header
<?php
/**
* Minimalistic code to add rel=canonical links on HTML header.
*
* No wish to install a full-blown SEO plugin just to get those rel=canonical links? That's fine!
* Just place the code below somewhere on your child's theme `functions.php` file.
* If you also wish to get a meta description tag in the header, uncomment the last few lines.
*
* @todo this only works for singulars (page, post, attachment page, etc.); not for archive/search pseudo-pages,
which do *not* have a unique identifier at the $wp_query level... that's (mostly) why SEO plugins include
@GwynethLlewelyn
GwynethLlewelyn / fa-golang.svg
Created November 20, 2021 13:26
Golang Logo by FontAwesome
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.