Skip to content

Instantly share code, notes, and snippets.

Avatar
📕
Follow me on twtxt.net/user/prologic

James Mills prologic

📕
Follow me on twtxt.net/user/prologic
View GitHub Profile
@prologic
prologic / go.mod
Created Jan 11, 2021
Twtxt Search Engine Crawler proof-of-concept
View go.mod
module twtxt-search-engine
go 1.14
require (
github.com/gocolly/colly/v2 v2.1.0
github.com/jointwt/twtxt v0.0.0-20210108082814-7098fcfa49df
github.com/prologic/read-file-last-line v0.0.0-20200806014221-326f63458987
github.com/sirupsen/logrus v1.7.0
)
@prologic
prologic / LearnGoIn5mins.md
Last active Jan 23, 2021
Learn Go in ~5mins
View LearnGoIn5mins.md
View docker-cache.sh
# First try, we get edb8f4a65586 as our hash
$ cat << EOF | docker build --no-cache -
> FROM alpine
> RUN touch foo
> EOF
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM alpine
---> a24bb4013296
Step 2/2 : RUN touch foo
---> Running in 9687f21f4edb
@prologic
prologic / post.go
Created Dec 18, 2019
A quick 'n dirty MIcroPub Go (Golang) client for Micro.blog (https://micro.blog)
View post.go
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
View highram.go
package main
import (
"fmt"
"log"
"os"
"runtime"
"runtime/pprof"
"strings"
@mrnugget
mrnugget / op_get_self.diff
Last active Mar 20, 2019
Fix for recursive closures that are defined in other functions. These break in version 1.0 of "Writing A Compiler In Go". This fix adds another opcode, OpGetSelf, and emits it whenever there's a reference to the currently executed function.
View op_get_self.diff
diff --git a/ast/ast.go b/ast/ast.go
index 8db3b39..f0420f4 100644
--- a/ast/ast.go
+++ b/ast/ast.go
@@ -2,6 +2,7 @@ package ast
import (
"bytes"
+ "fmt"
"strings"
@prologic
prologic / WSC.md
Last active Jul 29, 2017
Web Security Checklist (draft)
View WSC.md

Web Security Checklist (draft)

Instructions

Please fork this gist and use as your own checklist as you develop/deploy your web application or api.

WARNING: This checklist makes an assumption of the level of expertise and experience of the reader and assumes significant in-depth knowledge and experience in web development.

App

@prologic
prologic / SelfHosted.md
Last active Aug 25, 2020
Self-hosted Golang apps by James Mills / prologic
View SelfHosted.md

Self-Hosted Go (Golang) Web Apps

  • golinks - golinks is a web app that allows you to create smart bookmarks, commands and aliases by pointing your web browser's default search engine at a running instance. Similar to bunny1 or yubnub. (Demo) MIT Go
  • notes - notes is a self-hosted note taking web app that lets you keep track of your notes and search them in a easy and minimal way. (Demo) MIT Go
  • pastebin - pastebin is a simple pastebin service with convenient CLI. (Demo) MIT Go
  • shorturl - shorturl is a simple URL shortener with very tiny URL(s). (Demo) MIT Go
  • todo - todo is a simple todo manager. (Demo) MIT Go
  • wiki - w
@meyerdan
meyerdan / README.md
Last active May 21, 2018
Human consumable text format for simple workflows
View README.md

Motivation

Allow developers to specify workflows without the need for installing additional tooling such as a modeler.

Goals

  • It should be easy to define a simple workflow with a text editor only
  • The format must map down directly to BPMN
  • The format must be based on an existing text based format like (XML, JSON, YAML, TOML, ...)