https://rust-analyzer.github.io/manual.html#vimneovim
Use the file init.vim
| [package] | |
| name = "vorpal" | |
| version = "0.1.0" | |
| edition = "2021" | |
| [dependencies] | |
| walkdir = "2.3.2" | |
| ignore = "0.4.18" | |
| sha2 = "0.10.2" | |
| fs_extra = "1.2.0" |
| use actix_web::{get, App, HttpResponse, HttpServer, Responder}; | |
| #[get("/")] | |
| async fn hello() -> impl Responder { | |
| HttpResponse::Ok().body("Hello, World!") | |
| } | |
| #[actix_web::main] | |
| async fn main() -> std::io::Result<()> { | |
| HttpServer::new(|| { |
| function remove-docker-containers | |
| echo "Stop running shit" | |
| docker stop (docker ps -q) | |
| echo "Remove the whale shit" | |
| docker rm (docker ps -a -q) | |
| end | |
| function remove-docker-images | |
| remove-docker-containers |
| // Here is an extremely simple version of work scheduling for multiple | |
| // processors. | |
| // | |
| // The Problem: | |
| // We have a lot of numbers that need to be math'ed. Doing this on one | |
| // CPU core is slow. We have 4 CPU cores. We would thus like to use those | |
| // cores to do math, because it will be a little less slow (ideally | |
| // 4 times faster actually). | |
| // | |
| // The Solution: |
export AWS_DEFAULT_REGION=ap-northeast-1
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output table | \
awk '{print $2}' | grep -v ^$ | while read x; do echo "deleting $x" ; aws logs delete-log-group --log-group-name $x; done| #include <sys/socket.h> | |
| #include <sys/un.h> | |
| #include <sys/event.h> | |
| #include <netdb.h> | |
| #include <assert.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <errno.h> |
I've put together these notes as I read about DHT's in depth and then learned how the libtorrent implementation based on the Kademlia paper actually works.
400,000,000,000 (400 billion stars), that's a 4 followed by 11 zeros.
The number of atoms in the universe is estimated to be around 10^82.
A DHT with keys of 160 bits, can have 2^160 possible numbers, which is around 10^48
| #!/usr/bin/env python | |
| from __future__ import print_function | |
| import datetime | |
| import os | |
| import random | |
| import re | |
| import time | |
| import telepot |
| """Simples script para baixar imagens do captcha do portal TJSP. | |
| Copyright (c) 2016, Murilo Ijanc | |
| All rights reserved. | |
| Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions are met: | |
| * Redistributions of source code must retain the above copyright notice, this | |
| list of conditions and the following disclaimer. |