Skip to content

Instantly share code, notes, and snippets.

@jb55
jb55 / rsa-acc.js
Created June 24, 2019 00:38 — forked from syuhei176/rsa-acc.js
RSA accumulator
const primeNumberList = require('prime-number/list')
const BigNumber = require('bignumber.js');
const utils = require('ethereumjs-util');
// const primeNumberList = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47];
BigNumber.config({
DECIMAL_PLACES: 2,
ROUNDING_MODE: BigNumber.ROUND_FLOOR
})
@jb55
jb55 / keybase.md
Created May 11, 2019 04:02
keybase high security key

Keybase proof

I hereby claim:

  • I am jb55 on github.
  • I am jb55 (https://keybase.io/jb55) on keybase.
  • I have a public key whose fingerprint is 5B2B 1E4F 6221 6BC7 4362 AC61 D4FB A2FC 4535 A2A9

To claim this, I am signing this object:

@jb55
jb55 / main.rs
Created September 1, 2018 18:10
extern crate actix_web;
extern crate serde;
extern crate futures;
#[macro_use]
extern crate serde_derive;
mod activitypub;
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
pub enum LinkOr<T> {
Link(String),
NotLink(T)
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
@jb55
jb55 / main.rs
Created September 1, 2018 00:36
use std::io::prelude::*;
use std::net::TcpListener;
use std::net::TcpStream;
use std::io;
extern crate httparse;
fn main() {
let bind = "127.0.0.1";
#!/usr/bin/env bash
host="functional.cafe"
now="$(date -u '+%a, %d %b %Y %H:%M:%S GMT')"
published="$(date -u +'%FT%R:%SZ')"
doc=$(cat <<EOF
{
"@context": "https://www.w3.org/ns/activitystreams",
Uses:
* https://github.com/sos4nt/dynamic-colors
* A simple script to switch all active terminals: https://github.com/sos4nt/dynamic-colors/issues/12
* feh to switch bg
@jb55
jb55 / default.nix
Last active July 30, 2023 21:45
deploy dotnet core apps on nixos
{ stdenv, lib, bash, callPackage, writeText, makeWrapper, writeScript, dotnet-sdk,
patchelf, libunwind, coreclr, libuuid, curl, zlib, icu }:
let
config = "Staging";
project = "RazorCx.Api";
target = "linux-x64";
rpath = stdenv.lib.makeLibraryPath [ libunwind coreclr libuuid stdenv.cc.cc curl zlib icu ];
src/terrain.o src/terrain.d : src/terrain.c src/terrain.h src/geometry.h src/common.h \
src/buffer.h src/gl.h src/util.h src/vec3.h src/mat4.h src/delaunay.h \
src/perlin.h src/poisson.h
@jb55
jb55 / config.nix
Last active April 23, 2018 19:05
nix git deploys
{
pkg-json = lib.importJSON /var/git/project/deploy.json;
pkg = (import (pkgs.fetchgit pkg-json) {}).package;
}