Skip to content

Instantly share code, notes, and snippets.

@jb55
jb55 / rsa-acc.js
Created Jun 24, 2019 — forked from syuhei176/rsa-acc.js
RSA accumulator
View rsa-acc.js
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
keybase high security key
View keybase.md

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:

View main.rs
extern crate actix_web;
extern crate serde;
extern crate futures;
#[macro_use]
extern crate serde_derive;
mod activitypub;
View activitypub.rs
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
pub enum LinkOr<T> {
Link(String),
NotLink(T)
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
View main.rs
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";
View deliver-activity.sh
#!/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",
View gist:b76ed68c4537cb4db9f50eb1dd9f30f2
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 Mar 8, 2021
deploy dotnet core apps on nixos
View default.nix
{ 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 ];
View terrain.d
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 Apr 23, 2018
nix git deploys
View config.nix
{
pkg-json = lib.importJSON /var/git/project/deploy.json;
pkg = (import (pkgs.fetchgit pkg-json) {}).package;
}