Skip to content

Instantly share code, notes, and snippets.

@o0Ignition0o
o0Ignition0o / Cargo.toml
Created May 12, 2021 13:47
Let's spawn and kill stuff!
[package]
name = "tmp-phjhjr"
version = "0.1.0"
authors = ["o0Ignition0o <jeremy.lempereur@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0.40"
@o0Ignition0o
o0Ignition0o / Cargo.toml
Created May 12, 2021 09:46
A couple of probe runs and a configuration update
[package]
name = "tmp-phjhjr"
version = "0.1.0"
authors = ["o0Ignition0o"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0.40"
@o0Ignition0o
o0Ignition0o / Cargo.toml
Created April 9, 2021 08:04
Bastion http probe using reqwest
[package]
name = "bastion_probe_test"
version = "0.1.0"
authors = ["o0Ignition0o <jeremy.lempereur@gmail.com>"]
edition = "2018"
[dependencies]
bastion = { git = "https://github.com/bastion-rs/bastion.git", features = ["tokio-runtime"] }
tokio = { version = "1.4", features = ["time", "macros"] }
url = "2.2"
@o0Ignition0o
o0Ignition0o / bastion_floating_on_tide2.rs
Created June 28, 2020 18:36
Bastion floating on tide part 2: Building a bastion
use async_std::task;
use bastion::{blocking, context::BastionContext, msg, prelude::ChildrenRef, Bastion};
mod prime_number {
use std::{
iter,
time::{Duration, Instant},
};
#[derive(Debug)]
// destructuring
const monPerso = {
nom: "Jeremy",
lvl: 42,
classe: "mage"
};
console.log(monPerso.classe)
console.log(monPerso.lvl)
@o0Ignition0o
o0Ignition0o / bastion_floating_on_tide1.rs
Created February 23, 2020 09:56
Bastion floating on tide example!
use std::iter;
// in order to determine if n is prime
// we will use a primality test.
// https://en.wikipedia.org/wiki/Primality_test#Pseudocode
fn is_prime(n: u128) -> bool {
if n <= 3 {
n > 1
} else if n % 2 == 0 || n % 3 == 0 {
false
use std::iter;
// in order to determine if n is prime
// we will use a primality test.
// https://en.wikipedia.org/wiki/Primality_test#Pseudocode
fn is_prime(n: u128) -> bool {
if n <= 3 {
n > 1
} else if n % 2 == 0 || n % 3 == 0 {
false
fn fib_nth(n: usize) -> usize {
if n == 0 || n == 1 {
n
} else {
fib_nth(n - 1) + fib_nth(n - 2)
}
}
async fn fibsum(req: tide::Request<()>) -> String {
use std::time::Instant;
diff --git a/.gitignore b/.gitignore
index 785b5da6..b17d9aac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -358,11 +358,14 @@ xcuserdata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
+# Unity
/Unity/UnityDemo/Library
@o0Ignition0o
o0Ignition0o / # llvm-5.0 - 2020-01-16_21-09-26.txt
Created January 16, 2020 20:41
llvm-5.0 (llvm-hs/llvm/llvm-5.0) on macOS 10.15.2 - Homebrew build logs
Homebrew build logs for llvm-hs/llvm/llvm-5.0 on macOS 10.15.2
Build date: 2020-01-16 21:09:26