Skip to content

Instantly share code, notes, and snippets.

James Mills prologic

Block or report user

Report or block prologic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@prologic
prologic / build.log
Created Apr 29, 2019
muesli/beehive build 2019-04-29
View build.log
james@Jamess-MacBook-Pro
Mon Apr 29 14:55:34
~/Contributions
130
$ git clone muesli/beehive
Cloning into 'beehive'...
remote: Enumerating objects: 154, done.
remote: Counting objects: 100% (154/154), done.
remote: Compressing objects: 100% (96/96), done.
remote: Total 5218 (delta 77), reused 115 (delta 54), pack-reused 5064
@prologic
prologic / build.log
Created Apr 25, 2019
Beehive build error
View build.log
prologic@Jamess-MacBook
Thu Apr 25 12:50:32
~/Contributions/beehive
(master) 0
$ go build
# github.com/huin/goserial
../../go/pkg/mod/github.com/huin/goserial@v0.0.0-20121012073615-7b90efdb22b1/serial_posix.go:5:11: fatal error: 'termios.h' file not found
#include <termios.h>
^~~~~~~~~~~
1 error generated.
@prologic
prologic / op_get_self.diff
Created Mar 20, 2019 — forked from mrnugget/op_get_self.diff
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 / monkey.diff
Created Feb 14, 2019
Object Model for Monkey
View monkey.diff
diff --git a/ast/ast.go b/ast/ast.go
index e67346c..ea3ab30 100644
--- a/ast/ast.go
+++ b/ast/ast.go
@@ -187,6 +187,19 @@ func (i *Identifier) TokenLiteral() string { return i.Token.Literal }
// String returns a stringified version of the AST for debugging
func (i *Identifier) String() string { return i.Value }
+// Object represents a object value
+type Object struct {
@prologic
prologic / bf.monkey
Created Feb 11, 2019
Brainfuck in Monkey Lang
View bf.monkey
#!./monkey-lang
let fill = fn(x, i) {
let xs = []
while (i > 0) {
xs = push(xs, x)
i = i - 1
}
return xs
}
@prologic
prologic / consul.yml
Created Jan 14, 2019
Docker Stack for Consul
View consul.yml
version: "3.4"
services:
seed:
image: consul:latest
environment:
- "CONSUL_LOCAL_CONFIG={\"disable_update_check\": true}"
- "CONSUL_BIND_INTERFACE=eth0"
entrypoint:
- timeout #this seed fires up the cluster after which it is no longer needed
View gist:68ad785fecf3e6cf7ca603778f1b0bec
$ zpool status
pool: backup
state: DEGRADED
status: One or more devices could not be opened. Sufficient replicas exist for
the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
see: http://zfsonlinux.org/msg/ZFS-8000-2Q
scan: scrub repaired 0 in 11h52m with 0 errors on Sun Sep 13 19:07:03 2015
config:
View gist:8ad450c39040edd867361a25cf4d6d82
prologic@Jamess-MacBook
Sat Dec 23 15:46:59
~/go-projects/eris
(kzisme-43_HostMask) 2
$ go test -d -run TestUser_HostMask
DEBU[0000] accounts: map[admin:[74 68 74 104 74 68 65 48 74 71 116 85 85 49 74 86 99 49 74 79 85 121 57 68 98 69 104 49 87 69 100 118 89 86 108 77 100 71 86 110 99 108 112 54 89 110 65 51 78 68 66 79 90 71 89 49 87 85 90 104 100 84 90 116 82 122 86 109 98 49 86 75 100 88 81 53 99 107 90 68]]
INFO[0000] test listening on :6667
INFO[0000] metrics endpoint listening on :9314
DEBU[0000] test accept: [::1]:56401
2017/12/23 15:47:15 Connected to localhost:6667 ([::1]:6667)
@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

You can’t perform that action at this time.