😼
- https://hemera.systems/about
- @Hemera@meow.social
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code is licensed under CC0 | |
// | |
// | |
// The code assumes that your meshing goes in clockwise order, starting at the top left | |
// | |
// TL -> TR | |
// ^ v | |
// BL <- BR | |
// `alt_axis` and `alt2_axis` are `u` and `v` respectively |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bevy::prelude::*; | |
pub struct GlobalChildRef(pub Entity); | |
pub struct GlobalChild; | |
fn setup( | |
mut commands: Commands, | |
mut materials: ResMut<Assets<ColorMaterial>>, | |
global_child: ResMut<GlobalChildRef>, | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM registry.gitlab.com/sagemath/sage/sagemath:9.2.beta2 | |
# Copy Sample Notebook to Image | |
COPY --chown=sage:sage . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![cfg_attr(test, feature(test))] | |
use rayon::prelude::*; | |
use std::hash::Hash; | |
use std::hash::Hasher; | |
use smallvec::{SmallVec, smallvec}; | |
#[derive(Debug, Copy, Clone, PartialEq, Hash, Eq)] | |
pub struct Integer([u8; 10]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::{self, Write}; | |
use std::error::Error; | |
struct Person { | |
age: u8, | |
email: String | |
} | |
impl Person { | |
fn new(age: u8, email: String) -> Result<Person, &'static str> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Screen Video Capture | |
#! /usr/bin/env sh | |
length=${1-3} | |
delay=${2-0} | |
geometry=($(xrectsel "%wx%h %x,%y")) | |
output_dir="$(xdg-user-dir VIDEOS)/captures" | |
mkdir -p "$output_dir" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am theneikos on github. | |
* I am neikos (https://keybase.io/neikos) on keybase. | |
* I have a public key ASDmDbeVvEgGDZbW1FiC-d6Nq0jSFUjhhoWmJzFp1EvfRAo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simpleDeepMergeObjects = -> | |
ret = {} | |
for i, obj of arguments | |
for k, v of obj | |
if 'Object' is typeof v | |
ret[k] = simpleDeepMergeObjects ret[k], v | |
else | |
ret[k] = v | |
return ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate getopts; | |
use std::io::{TcpListener, TcpStream}; | |
use std::io::{Acceptor, Listener}; | |
use std::io::IoErrorKind; | |
use std::thread::Thread; | |
use std::os; | |
use getopts::{optopt, optflag, getopts, OptGroup, usage}; | |
fn print_usage(program: &str, opts: &[OptGroup]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fmt; | |
struct Node<T: Ord + fmt::Show> { | |
pub data: T, | |
pub left: Option<Box<Node<T>>>, | |
pub right: Option<Box<Node<T>>>, | |
} | |
impl<T: Ord + fmt::Show> Node<T> { | |
fn new(d: T) -> Node<T> { |
NewerOlder