- Create a directory
certs
. - Generated the TLS keys under
certs
directory. - Run the docker command.
docker run \
-p 6650:6650 -p 8080:8080 \
-p 8081:8081 -p 6651:6651 \
-p 8443:8443 \
-v $PWD/certs:/certs \
use std::collections::HashMap; | |
fn main() { | |
let action = std::env::args().nth(1).expect("Please provide an action"); | |
let item = std::env::args().nth(2).expect("Please provide an item"); | |
let mut todo = Todo::new().expect("Initialisation of db failed"); | |
if action == "add" { | |
todo.insert(item); |
# Instructions for fresh install | |
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon | |
# reboot | |
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc | |
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc | |
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable | |
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin | |
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager |
name: Security audit | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
paths: | |
- '**/Cargo.toml' | |
- '**/Cargo.lock' | |
jobs: | |
security_audit: |
certs
.certs
directory.docker run \
-p 6650:6650 -p 8080:8080 \
-p 8081:8081 -p 6651:6651 \
-p 8443:8443 \
-v $PWD/certs:/certs \
Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.
Note that you need the https://brew.sh/ package manager installed on your machine.
brew install fish
## | |
## HTTP Router benchmarks -- August 31st, 2017 running Go 1.9.0 | |
## | |
## This benchmark suite is based on https://github.com/julienschmidt/go-http-routing-benchmark | |
## using the most up-to-date version of each pkg as of today. Each router has their own | |
## pros and cons, so consider the designs of each router to suit your application. | |
## | |
[peter@pak ~/Dev/go/src/github.com/pkieltyka/go-http-routing-benchmark]$ go test -v -bench="Chi" . |
package main | |
// Generate RSA signing files via shell (adjust as needed): | |
// | |
// $ openssl genrsa -out app.rsa 1024 | |
// $ openssl rsa -in app.rsa -pubout > app.rsa.pub | |
// | |
// Code borrowed and modified from the following sources: | |
// https://www.youtube.com/watch?v=dgJFeqeXVKw | |
// https://goo.gl/ofVjK4 |
package mongo | |
import ( | |
"time" | |
"log" | |
"gopkg.in/mgo.v2" | |
"gopkg.in/mgo.v2/bson" | |
) | |
// Profile - is the memory representation of one user profile |