Skip to content

Instantly share code, notes, and snippets.

@o0Ignition0o
o0Ignition0o / Cargo.toml
Created May 12, 2021
Let's spawn and kill stuff!
View Cargo.toml
[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
A couple of probe runs and a configuration update
View Cargo.toml
[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 Apr 9, 2021
Bastion http probe using reqwest
View Cargo.toml
[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 Jun 28, 2020
Bastion floating on tide part 2: Building a bastion
View bastion_floating_on_tide2.rs
use async_std::task;
use bastion::{blocking, context::BastionContext, msg, prelude::ChildrenRef, Bastion};
mod prime_number {
use std::{
iter,
time::{Duration, Instant},
};
#[derive(Debug)]
View terribletryouts.js
// 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 Feb 23, 2020
Bastion floating on tide example!
View bastion_floating_on_tide1.rs
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
View prime.rs
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
View main.rs
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;
View patch.diff
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 Jan 16, 2020
llvm-5.0 (llvm-hs/llvm/llvm-5.0) on macOS 10.15.2 - Homebrew build logs
View # llvm-5.0 - 2020-01-16_21-09-26.txt
Homebrew build logs for llvm-hs/llvm/llvm-5.0 on macOS 10.15.2
Build date: 2020-01-16 21:09:26