Skip to content

Instantly share code, notes, and snippets.

View ejemba's full-sized avatar

Epo Jemba ejemba

  • Kametic
  • France
View GitHub Profile
@deepu105
deepu105 / VSCode-extensions
Created June 16, 2019 14:49
VSCode plugins I use
code --install-extension QassimFarid.ejs-language-support
code --install-extension SirTori.indenticator
code --install-extension TimonVS.ReactSnippetsStandard
code --install-extension TwentyChung.jsx
code --install-extension abusaidm.html-snippets
code --install-extension asvetliakov.move-imports
code --install-extension aws-scripting-guy.cform
code --install-extension bierner.markdown-preview-github-styles
code --install-extension ccitiriga.TSMethodCreator
code --install-extension christian-kohler.npm-intellisense
@faiface
faiface / .md
Last active January 23, 2020 04:53
Go 2 generics counterproposal: giving up restricting types

Go 2 generics counterproposal: giving up restricting types

"I want to make a generic function which works on any type that satisfies these and these constraints."

When we think about generics, this is the sort of problem that pops up into our minds. The critical part is restricting the set of types our function intends to work on. Trying to solve this problem of restriction has led people to what I call reasons why we hesitate to have generics in Go.

C++ templates with horrific error messages, or even it's new concepts, Java's T extends Comparable<T>, Rust's generic traits, Haskell's type classes, and sadly even contracts from the [original generics proposal by the Go Team](https://go.googlesource.com/proposal/+/master/desig

@Northern-Lights
Northern-Lights / gotk-glade-test.go
Created November 24, 2018 17:25
How to use Glade UI builder in a Go/golang GTK application using gotk
package main
import (
"fmt"
"log"
"os"
"reflect"
"github.com/gotk3/gotk3/glib"
@shijuvar
shijuvar / main.go
Created October 14, 2017 07:13
eventstore: A NATS Streaming client that publish events on NATS Streaming channel
package main
import (
"context"
"log"
"net"
stan "github.com/nats-io/go-nats-streaming"
"google.golang.org/grpc"
@ejemba
ejemba / map_filter_reduce.go
Created December 14, 2016 20:16 — forked from icholy/map_filter_reduce.go
chaining channels in go
package main
import (
"unicode/utf8"
)
type Item string
type Stream chan Item
type Acc string
@nanoninja
nanoninja / jose_jwt_go_usage.md
Created September 29, 2016 14:35
JOSE - JWT Usage Examples

JOSE - JWT Usage Examples

JOSE is a comprehensive set of JWT, JWS, and JWE libraries.

jwt.io

Installation

go get github.com/SermoDigital/jose
@jasonm23
jasonm23 / ibm-box-drawing-hydra.el
Last active December 6, 2020 23:58
Draw DOS style boxes in Emacs with a hydra
;;; ibm-box-drawing-hydra --- draw DOS style boxes with a hydra
;;; Commentary:
;; Use M-x load-library ibm-box-drawing-hydra (after placing this file in the Emacs lisp load-path)
;; Draw box with IBM single line box characters. - activate with C-x d
;;
;; Press Esc to exit.
;;
;; Essentially treats the left hand on a QWERTY layout
@vkostyukov
vkostyukov / statuses.md
Last active February 13, 2024 21:39
HTTP status codes used by world-famous APIs
API Status Codes
[Twitter][tw] 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504
[Stripe][stripe] 200, 400, 401, 402, 404, 429, 500, 502, 503, 504
[Github][gh] 200, 400, 422, 301, 302, 304, 307, 401, 403
[Pagerduty][pd] 200, 201, 204, 400, 401, 403, 404, 408, 500
[NewRelic Plugins][nr] 200, 400, 403, 404, 405, 413, 500, 502, 503, 503
[Etsy][etsy] 200, 201, 400, 403, 404, 500, 503
[Dropbox][db] 200, 400, 401, 403, 404, 405, 429, 503, 507
@jjasghar
jjasghar / yas-company-helm.el
Last active December 13, 2021 16:19 — forked from fletch/yas-company-helm.el
Yasnippet + company + helm
;; http://emacs.stackexchange.com/questions/10431/get-company-to-show-suggestions-for-yasnippet-names
;; Add yasnippet support for all company backends
;; https://github.com/syl20bnr/spacemacs/pull/179
(defvar company-mode/enable-yas t
"Enable yasnippet for all backends.")
(defun company-mode/backend-with-yas (backend)
(if (or (not company-mode/enable-yas) (and (listp backend) (member 'company-yasnippet backend)))
backend
(append (if (consp backend) backend (list backend))
@EricMountain-1A
EricMountain-1A / gocore.go
Last active October 5, 2015 10:27
Coring in Go
// Produces a core.
// Usage: GOTRACEBACK=crash ./example
// Check ulimit -c beforehand.
// Note the root signal is SEGV, however Go catches this, handles it and raises ABRT.
package main
import (
"fmt"
"sync/atomic"
"unsafe"