Skip to content

Instantly share code, notes, and snippets.

View leogr's full-sized avatar
🎓
I made Falco fly

Leonardo Grasso leogr

🎓
I made Falco fly
View GitHub Profile
@leogr
leogr / screen-stuff.md
Created July 2, 2017 18:49 — forked from gesellix/screen-stuff.md
screen and Docker for Mac
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty



screen -AmdS docker ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
screen -r docker
# enter, then disconnect with Ctrl-a d
screen -S docker -p 0 -X stuff $(printf root\\r\\n)
screen -r docker
@leogr
leogr / cpuminer-centos-setup.txt
Created January 19, 2018 13:22
WIP: cpuminer fast setup on CentOS
yum install epel-release
yum install htop
yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce
sudo systemctl start docker
docker build --tag cpuminer-multi https://github.com/leogr/cpuminer-multi.git
@leogr
leogr / cpuminer-arm64-Dockerfile
Created January 22, 2018 09:30
cpuminer-arm64-Dockerfile
# Usage: docker build .
# Usage: docker run tpruvot/cpuminer-multi -a xevan --url=stratum+tcp://yiimp.ccminer.org:3739 --user=iGadPnKrdpW3pcdVC3aA77Ku4anrzJyaLG --pass=x
FROM ubuntu:14.04
MAINTAINER Tanguy Pruvot <[email protected]>
RUN apt-get update -qq
RUN apt-get install -qy automake autoconf pkg-config libcurl4-openssl-dev libssl-dev libjansson-dev libgmp-dev make g++ git
@leogr
leogr / Install.md
Created January 26, 2019 10:43
[WIP] Arch on X1 Carbon (4 gen)

From live boot:

loadkeys it
cd /usr/share/kbd/consolefonts
setfont latarcyrheb-sun32.psfu.gz
@leogr
leogr / bip32_web3secret.go
Created July 18, 2019 10:56
Golang BIP32 private key to Web3 Secret Storage conversion
package main
import (
"fmt"
"io/ioutil"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/crypto"
"github.com/jbenet/go-base58"
"github.com/tyler-smith/go-bip32"
@leogr
leogr / shardedmap.go
Created November 22, 2019 15:35
Golang sharded map
package cache
import (
"sync"
)
type cacheItem interface{}
type Cache interface {
// Get returns the value associated with the key parameter.
@leogr
leogr / build_falco.md
Last active December 17, 2019 10:03
wip: manually build falco

Build falco

Tested on falcosecurity/falco#968

Step 0 - Dependencies

pacman -S gcc cmake make pkgconfig autoconf automake patch elfutils libelf libtool linux-headers jq oniguruma zlib ncurses yaml-cpp openssl curl c-ares protobuf grpc libyaml

Step 1 - Make dirs, clone sysdig and falco, etc...

@leogr
leogr / self-signed-certificate-with-custom-ca.md
Created March 20, 2020 10:47 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@leogr
leogr / ca_and_cert_golang_demo.go
Created March 24, 2020 16:54 — forked from shaneutt/LICENSE
Golang: Demonstrate creating a CA Certificate, and Creating and Signing Certs with the CA
package main
import (
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
@leogr
leogr / falco_rule_skeleton.yaml
Created October 25, 2020 10:33
A Falco rule skeleton
# A Falco rules file is a YAML file containing three types of elements:
#
# - rule: Conditions under which an alert should be generated.
# A rule is accompanied by a descriptive output string that is sent with the alert.
#
# - macro: Rule condition snippets that can be re-used inside rules and even other macros.
# Macros provide a way to name common patterns and factor out redundancies in rules.
#
# - list: Collections of items that can be included in rules, macros, or other lists.
# Unlike rules and macros, lists cannot be parsed as filtering expressions.