Skip to content

Instantly share code, notes, and snippets.

View nothingnesses's full-sized avatar

nothingnesses

  • GMT+0
View GitHub Profile
@nothingnesses
nothingnesses / lib.js
Created February 14, 2024 08:22
Tree Traversal
// Licensed under [BlueOak-1.0.0](https://spdx.org/licenses/BlueOak-1.0.0.html).
"use strict";
/**
* @param {any} a
* @returns {string}
*/
export const get_type = (a) => {
switch (true) {
@nothingnesses
nothingnesses / index.html
Created February 5, 2024 17:12
Carousel based on scroll snap
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.jsdelivr.net/npm/@unocss/runtime"></script>
</head>
<body>
<main class="h-screen w-screen bg-white grid items-center justify-items-center">
<div class="carousel-container w-full h-full grid items-center justify-items-center">
@nothingnesses
nothingnesses / Main.js
Last active May 31, 2021 13:08
Bitburner Netscript PureScript FFI
"use strict";
exports.pure_promise_1 = function(func) {
return function(a) {
return function() {
return func(a);
};
};
};
@nothingnesses
nothingnesses / rpn_calc.rs
Created July 18, 2017 20:35
Simple RPN calculator in Rust
use std::io;
fn main() {
let mut v: Vec<f64> = Vec::new();
loop {
let mut input = String::new();
io::stdin().read_line(&mut input)
.expect("Failed to read line");