Skip to content

Instantly share code, notes, and snippets.

View sachaarbonel's full-sized avatar
👨‍💻
Uncovering bugs

Sacha Arbonel sachaarbonel

👨‍💻
Uncovering bugs
View GitHub Profile
@sachaarbonel
sachaarbonel / agnoster.bash
Created August 31, 2018 08:12 — forked from rtfpessoa/agnoster.bash
Agnoster Bash Theme
# vim: ft=bash ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for BASH
#
# (Converted from ZSH theme by Kenny Root)
#
# # README
#
# In order for this theme to render correctly, you will need a
@sachaarbonel
sachaarbonel / GoConcurrency.md
Created September 6, 2018 07:51 — forked from rushilgupta/GoConcurrency.md
Concurrency in golang and a mini Load-balancer

INTRO

Concurrency is a domain I have wanted to explore for a long time because the locks and the race conditions have always intimidated me. I recall somebody suggesting concurrency patterns in golang because they said "you share the data and not the variables".

Amused by that, I searched for "concurrency in golang" and bumped into this awesome slide by Rob Pike: https://talks.golang.org/2012/waza.slide#1 which does a great job of explaining channels, concurrency patterns and a mini-architecture of load-balancer (also explains the above one-liner).

Let's dig in:

Goroutines

@sachaarbonel
sachaarbonel / sub.go
Created September 7, 2018 19:30 — forked from netroy/sub.go
Redis subscribe over websockets in golang
package main
import (
"github.com/chuckpreslar/emission"
"github.com/garyburd/redigo/redis"
"github.com/gorilla/websocket"
"log"
"net/http"
)
//
// Companion code to https://medium.com/statuscode/pipeline-patterns-in-go-a37bb3a7e61d
//
// To run:
// go get github.com/pkg/errors
// go run -race pipeline_demo.go
//
package main
@sachaarbonel
sachaarbonel / golang_job_queue.md
Created September 7, 2018 21:40 — forked from harlow/golang_job_queue.md
Job queues in Golang
@sachaarbonel
sachaarbonel / main.go
Created September 12, 2018 14:02 — forked from vdparikh/main.go
GoLang Verify/Generate JWT Token
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"strings"
"time"
@sachaarbonel
sachaarbonel / README.md
Created September 16, 2018 21:08 — forked from surma/README.md
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@sachaarbonel
sachaarbonel / bottom_sheet.dart
Created September 20, 2018 09:57 — forked from andrelsmoraes/bottom_sheet.dart
Modal Bottom Sheet with Input Fields fix for Flutter (Fix issue with overlap with keyboard and fix for tapping to dismiss) - Flutter Version: Channel beta, v0.5.1
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
@sachaarbonel
sachaarbonel / ipfs.yml
Created September 28, 2018 20:05 — forked from kordless/ipfs.yml
Deploy IPFS on Kubernetes
apiVersion: v1
kind: Service
metadata:
name: ipfs
spec:
type: NodePort
ports:
- name: ipfs
port: 8080
targetPort: 8080
@sachaarbonel
sachaarbonel / Zero_knowledge_db.md
Created October 4, 2018 22:17 — forked from thiloplanz/Zero_knowledge_db.md
Zero-knowledge databases

Zero knowledge databases

The idea

The idea is to provide a database as a service to end users in such a way that no one except the user herself can access the data, not even the hosting provider or the database administrator.

Advantages

  • A privacy- and/or security-conscious user will have more trust in such a setup.
  • The service provider cannot be coerced to release the data they were trusted with, and he cannot be held responsible for the content he is storing.