Skip to content

Instantly share code, notes, and snippets.

@AxelRHD
AxelRHD / index.html
Last active Jan 24, 2021
Cycle JS - counter M-V-I
View index.html
<!DOCTYPE html>
<html>
<head>
<script src="https://npmcdn.com/xstream@5.0.6/dist/xstream.min.js"></script>
<script src="https://npmcdn.com/@cycle/dom@10.0.0-rc34/dist/cycle-dom.min.js"></script>
<script src="https://npmcdn.com/@cycle/xstream-run@3.0.2/dist/cycle.min.js"></script>
<script src="https://npmcdn.com/@cycle/http@9.0.0-rc9/dist/cycle-http-driver.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
View boilerplate.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>My HTML Boilerplate</title>
</head>
<body>
<script src="./main.js"></script>
View keybase.md

Keybase proof

I hereby claim:

  • I am AxelRHD on github.
  • I am axelrhd (https://keybase.io/axelrhd) on keybase.
  • I have a public key whose fingerprint is 43A8 8F88 AD3E 4CEE 220D D4BB 2821 E9A5 A558 BB69

To claim this, I am signing this object:

@AxelRHD
AxelRHD / goroutine-shutdown-channel.go
Created Aug 19, 2019
Shutdown multiple goroutines over channel
View goroutine-shutdown-channel.go
package main
import (
"log"
"sync"
"time"
)
func main() {
var wgDone sync.WaitGroup
@AxelRHD
AxelRHD / Makefile
Created Jul 18, 2019
Makefile for GO
View Makefile
# Go
GOCMD=go
XGO=xgo
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
BINARY_NAME=my-app
exec: run clean
@AxelRHD
AxelRHD / go_middleware.go
Last active Aug 8, 2018
GO middleware example (with gorilla/mux)
View go_middleware.go
package main
import (
"fmt"
"log"
"net/http"
"github.com/gorilla/context"
"github.com/gorilla/mux"
)
@AxelRHD
AxelRHD / channeling.go
Last active Jul 31, 2018
Golang Snippets
View channeling.go
package main
import (
"fmt"
"sync"
"time"
)
type message struct {
data int