Skip to content

Instantly share code, notes, and snippets.

View z3t0's full-sized avatar

Rafi Khan z3t0

View GitHub Profile
  • a remind me later email system
    • can be sending sms push notifs, discord/telegram bots etc
    • just a way for me to send myself areminder later
    • calendar -> can be missed, no persistent item
    • todo app -> well its not a task exactly so this can be annoying bc its less actionable and more of a reminder
    • best solution so far has been using gmail send later, but this does not work when using mail app
    • another idea - send it to a known email, so you can use an email for ingestiong (eg mail app on macos ios )
  • then it will register a reminder to be sent back to you in a future date.
  • p2p shared wikipedia native app one click.
    • extend concept of pkm - https://github.com/z3t0/pkm
    • cosmocc/redbean runtime
    • c++ app
    • couchdb for sync
    • future extensions
      • collaborative editing (CRDT)
      • mobile app
      • web app
    • criteria analysis
// trying to convert an arraylist T to an array of T
// this works
List<String> list = new ArrayList<>();
String[] a = list.toArray(new String[0]);
// why doesn't this?
arr = unsorted.toArray(new T[0]);
@z3t0
z3t0 / data.json
Created May 30, 2018 14:13
converting hex bytes to json struct
{"source_address": 1,
"destination_address": 0,
"payload_type": 0,
"length": 0,
"crc_present": 0,
"payload": {"mission_time": 0,
"state": 0,
"flag_ematch_1_present": 0,
"flag_ematch_2_present": 0,
"flag_parachute_deployed": 0,
def create_linear_stock(value=None):
if not value:
value = random.randint(1, 100)
stock = dict(locals())
stock['symbol'] = uuid4()
stock['slope'] = random.uniform(-1, 1)
@z3t0
z3t0 / notes.org
Created April 30, 2018 02:36
research on database

SQL vs NOSQL

  • SQL: relational, NOSQL: non relational
  • SQL: universal but defined schema
  • NoSQL: unstructured dynamic schema
  • SQL is vertically scalable, increased resources of one machine
  • NoSQL is horizontally scalable, increase number of machines
  • NoSQL can become larger and more powerful
  • NoSQL does not require a DBA (Database Administrator)
    • flexible and high performing
@z3t0
z3t0 / asd
Created April 29, 2018 23:35
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDJ4zjIUueE0QNGhFCA77+ODznANyIOtiTlPsLDMpbnTLi5xHFHb/OP9w8wyD32eB83qbzpfow1Kh0MArPb5qCnBl2ziCyzIW33pdzwngJSlVGZmS/Svn8WEMnrRmddxfzRR9F89fQ/+Sx6eQKk3bmpq/r9A9ukgp20Kl3uIWj4RLnVkuyb8fwKGD+3m2UlOxgmiV8HP03Kev9vzv/ZzioRi2zVZv7QmbfhWOFB08L4PWTtqSzkR3pQyDGngorcm95+fWnAAD9rZaA71wTU5Rv9WL7jJ7a0qJ62EHpD0Z+m4guhLjoZ7W3eqcad7n//OxrJ5He3RWdy1zgne7fa9lRN2HI1J8JHCVcNan1NXHNtK012tvomeYce0cIcRPLNILHOAadsBYue1ML8Gaia/fGdx8A/SuUTDg5974lH7B9C54XD4F4u9yURGLK/ls7azMSrKe5c3RfqMZytQXXYKihTxIPWjWpXqOTe71yfp3C1tHLttgeU2C2wEmV0/H0EbjqXdkdzQMPTnvMbrW3y0WwCCB9QGJ9w4QBBGATO0Jwz4IFZLE2FJqh6ZxNfkBNzukpye4L9nYRIEyc2RJwuv9eEsCeBQcCsd6D2+Pk9tYJJqDWFIMiQI1rK9/SFrwQy4BfDS1GoeeQHQOzRuzHrfRR4+sF+c6M5urdjD99cJi2cXQ== [email protected]
➜ IRremote-SIL git:(master) make version
make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
g++ --version
Warning: Opening nnimap server on gmail...failed: ; Unable to open server nnimap+gmail due to: make client process failed: Connection refused, :name, *nnimap*, :buffer, *nnimap localhost nil *nntpd**, :host, localhost, :service, imap; Opening nntp server on news...failed: >>> (file-error make client process failed Network is unreachable :name nntpd :buffer *server news nntp *nntpd** :host news :service nntp); Server nntp+news previously determined to be down; not retrying; Opening nntp server on news...failed: >>> (file-error make client process failed Network is unreachable :name nntpd :buffer *server news nntp *nntpd** :host news :service nntp); Server nntp+news previously determined to be down; not retrying
(defparameter *test-db* nil)
(push (list :name "Bob") *test-db*)
(print *test-db*)
;; ((:NAME "Bob"))
(getf (first *test-db*) :bots)
;; returns nil (as expected)
(setf (getf (first *test-db*) :bots) '(1))
;; returns (1) (as expected)