Skip to content

Instantly share code, notes, and snippets.

View codegod100's full-sized avatar
๐ŸŒ
Hack the planet

nandi codegod100

๐ŸŒ
Hack the planet
View GitHub Profile
#![deny(warnings)]
use std::{process, thread};
fn main() {
let mut threads = vec![];
let str = std::fs::read_to_string("/proc/sys/kernel/threads-max").unwrap();
let maxt: i32 = str.trim().parse().unwrap();
let mut count = 0;
for x in 1..maxt {
let b = thread::Builder::new();
let r = b.spawn(move || {
use simple_logger::SimpleLogger;
use serde::{Deserialize,Serialize};
use serde_json::{ json};
#[derive(Debug)]
enum Message {
Ping,
Command { name: String, arg: String },
}
- target: garden/vera
url: https://git.anagora.org/vera/notes.git
format: foam
- target: garden/bmann
protocol: git
url: https://github.com/bmann/bmcgarden.git
format: jekyll
@codegod100
codegod100 / church.js
Last active June 12, 2021 19:24
church numerals
function church(n){
return function(f){
return function(x){
let res = x
for(let i=0;i<n;i++){
res = f(res)
}
return res
}
}