Skip to content

Instantly share code, notes, and snippets.

View reqshark's full-sized avatar
🪂
ridge soaring

Bent Cardan reqshark

🪂
ridge soaring
View GitHub Profile
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

$ node stream-heap.js
Readable 358.53592 134
Writable 623.37824 258
Transform 709.05584 1310
$ node pull-heap.js
values 155.2692 70
map 84.50328 7
@gboddin
gboddin / 00-MINING.md
Last active January 27, 2024 11:58
Mining optimisation under Linux

Mining under linux

Disclaimer

I'm in no case responsible for fried hardware, erased software or burning down houses. Make sure your miners are always well cooled.

General recommendation

Though you can easily mix nVidia and AMD in the same rig with Linux, it's recommended to use a different thread for each platform so a Driver crash doesn't bring the whole rig down. It should be noted however, that some mining software have trouble when both architecture are found on the same rig.

@fatihky
fatihky / mill-nano.c
Last active September 13, 2017 22:00
libmill + nanomsg
#include <stdio.h>
#include <nanomsg/nn.h>
#include <nanomsg/pair.h>
#include <libmill.h>
struct nn_mill_msg {
int size;
char *msg;
};
@fatihky
fatihky / git-workflow.md
Last active October 19, 2016 05:36
git wokflow merge

git clone blah

git checkout master <--that's normal

git checkout test3

git log <-- i want to check the log to understand how the history in the branch looks

if the branch is out of sync

@reqshark
reqshark / iosbuild.sh
Last active September 3, 2018 05:44
libmill iOS cross-compile for 32 bit (armv7) and 64 bit (arm64) iOS, and i386 and x86_64 simulators
# Copyright (c) 2015 Bent Cardan
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom
# the Software is furnished to do so, subject to the following conditions:
@dominictarr
dominictarr / logdb.md
Last active July 29, 2016 17:06
ideas for a modular database

intro

we've had great success building modular database stuff on top of leveldb with node, but as I have learnt more about databases it's become apparent to me that the idea of a modular database would be better implemented at a slightly lower level.

Level db provides a sorted key:value store, which, because of the sorted property, many things can be implemented on top of. For example, for replication, or for consistent materialized views, we often need a write ahead log. This can easily be implemented via a batch write to level, and writing the log into a section of the leveldb key space which is treated as append only.

@dominictarr
dominictarr / readme.md
Last active April 20, 2023 02:24
thoughts on crypto modules

We need better crypto primitives and modules - there are lots of standards out there that are dangerous! Things that seem like they should work, don't and this leaves security holes where they shouldn't be, or creates situations where an application must be implemented with knowledge of the internal features of crypto "primitives". example: length-extention attack on api authentication

What is right about the word primitive: simple api + clear security properties (* this isn't always the case, but it can and should be) But, there are other great crypto "primitives" (modules) that are made from actual primitives but never the less provide a simple api and clear properties. A good example of this is nacl's crypto_box it has eliptic curves, salsa20 and poly1305 to create a encrypted buffer that can only be decrypted by the intended key.

easy primitives

  • hash (except hashes that have length extension attacks)
  • digital signatures (bu
@max-mapper
max-mapper / app.conf
Last active August 29, 2015 14:20
publicbits nginx ssl config
# generated by taco-nginx
upstream signalhub {
server 127.0.0.1:54082;
}
server {
listen 80;
server_name signalhub.*;
location / {
proxy_pass http://signalhub;
@reqshark
reqshark / lxc.sh
Last active January 1, 2022 04:25
set up linux containers with node.js
# update the host
apt-get update && apt-get upgrade -y # && apt-get dist-upgrade -y && apt-get autoremove --purge -y && apt-get autoclean -y
# https://www.stgraber.org/
# install linux containers
sudo apt-get install lxc
# list all containers and view their current status
sudo lxc-ls -f