Skip to content

Instantly share code, notes, and snippets.

View poolpOrg's full-sized avatar

Gilles Chehade poolpOrg

View GitHub Profile
@poolpOrg
poolpOrg / example.go
Created May 1, 2024 10:31
table API in Golang
package main
import (
"github.com/poolpOrg/OpenSMTPD-framework/table"
)
func main() {
table.Init()
table.OnUpdate(func() {
$ plakar ls
$ plakar push 'imap://gilles:XXXX@mail.poolp.org'
$ plakar ls
2023-08-05T21:25:41Z 814d2460 764 MB 8m39s imap://gilles:XXXX@mail.poolp.org
$ plakar ls 814d
2023-08-05T21:25:41Z drwx------ root wheel 0 B Archive
2023-08-05T21:25:41Z drwx------ root wheel 0 B Drafts
2023-08-05T21:25:42Z drwx------ root wheel 0 B INBOX
2023-08-05T21:25:42Z drwx------ root wheel 0 B Junk
2023-08-05T21:25:41Z drwx------ root wheel 0 B Sent
$ plakar create -no-encryption
$ plakar -no-cache push s3://minioadmin:minioadmin@192.168.0.38:9000/abcde
$ plakar ls
2023-08-05T11:44:49Z ad850d80 2.9 MB 0s s3://minioadmin:minioadmin@192.168.0.38:9000/abcde
$ plakar ls ad85
2023-08-05T11:44:49Z drwx------ root wheel 0 B juju
$ plakar ls ad85:juju
2023-08-05T11:44:49Z drwx------ root wheel 0 B .git
2023-08-05T11:44:49Z drwx------ root wheel 0 B ast
2023-08-05T11:44:49Z drwx------ root wheel 0 B cmd
@poolpOrg
poolpOrg / ASS.md
Created December 13, 2018 16:02 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@poolpOrg
poolpOrg / 12bars-blues.ear
Created May 25, 2022 23:54
sample earring source: 12bars-blues.ear
project {
bpm 120;
time 4 4;
track {
bar { whole chord C on beat 1; }
bar { whole chord F on beat 1; }
bar { whole chord C on beat 1; }
bar { whole chord C on beat 1; }
bar { whole chord F on beat 1; }
@poolpOrg
poolpOrg / 12bars-blues.ear
Created May 25, 2022 23:53
sample earring source code: 12bars-blues.ear
project {
bpm 120;
time 4 4;
track {
bar { whole chord C on beat 1; }
bar { whole chord F on beat 1; }
bar { whole chord C on beat 1; }
bar { whole chord C on beat 1; }
bar { whole chord F on beat 1; }
$ plakar mount /tmp/plakarfs-1 &
$ cd /tmp/plakarfs-1/
$ ls -la
total 488960
drwxrwxrwx 1 root wheel 0 30 Aug 1754 .
drwxrwxrwt 7 root wheel 224 7 May 02:45 ..
drwx------ 1 gilles staff 38198936 2 May 20:58 178f91b4-f7be-4da4-8d01-9534db9a2cff
drwx------ 1 gilles staff 22902629 7 May 03:11 1f41b7d4-abb1-46ff-9ed5-3d19f18f8891
drwx------ 1 gilles staff 3057091 7 May 00:42 3d99f3fa-604b-4b90-b20e-3997d9eb595a
drwx------ 1 gilles staff 22902629 7 May 03:10 512338cc-9b13-483d-935a-d9e0d224030d
// create default repository, no encryption
$ plakar create -no-encryption
// create a clone
$ plakar clone to ssh://nas.poolp.org
// push backups locally
$ plakar push
$ plakar push
$ plakar push
gilles@desktop plakar % plakar on plakar://debug.poolp.org create
passphrase:
created repository at plakar://debug.poolp.org:9876/992986b3-e5ba-46e0-a6c3-820e889494df
gilles@desktop plakar % export PLAKAR_REPOSITORY=plakar://debug.poolp.org:9876/992986b3-e5ba-46e0-a6c3-820e889494df
gilles@desktop plakar % plakar ls
keypair passphrase:
gilles@desktop plakar % plakar push /bin
keypair passphrase:
gilles@desktop plakar % plakar ls
keypair passphrase:
@poolpOrg
poolpOrg / test.go
Created April 9, 2021 17:13
ipcmsg example
package main
import (
"log"
"os"
"os/exec"
"syscall"
"time"
"github.com/poolpOrg/ipcmsg"