Skip to content

Instantly share code, notes, and snippets.

View cubetastic33's full-sized avatar
:octocat:
in a jinxed juxtaposition

aravk33 cubetastic33

:octocat:
in a jinxed juxtaposition
View GitHub Profile
@cubetastic33
cubetastic33 / times.csv
Created July 1, 2018 09:08
All the solvetimes as recorded in CLI Cube Timer, https://npmjs.org/package/cli-cube-timer
0.00 D' F L F D2 L D' L' U B L2 B' D R2 D L2 F' R' D F2
0.00 L' D L' D' L' U' R2 B2 L B D F2 L' D B' U2 L2 U2 L B2
0.00 U2 B' U B' L U2 F2 D R2 D2 F' L2 D R2 D' L F' L' D2 F2
0.00 R' F2 U B L F R' B' U B' L' U L2 B2 D' R' D2 B2 U B
0.00 F' R2 U' F' U2 F' L F2 D2 L2 D' B D L' B R2 B2 D L' F
0.00 B' U B R U F2 U2 B' U' R' B D R B2 U2 B2 R' B2 D' R
0.00 L' B L U2 R B2 U' R2 U2 B2 U' F' L2 U2 F' R2 D2 L B U'
0.00 F U' B2 D L' U2 F' U L U' B R' D' F2 L' B U2 F' U2 F
0.00 L2 D' F2 U' L U L B' L2 D2 B' L U' F' U' R2 B2 D B L'
1.07 B D' F2 U' R2 D' R' B2 U F' R' U R' F2 D' F' U R D2 R2
@cubetastic33
cubetastic33 / word_snake.rs
Last active August 17, 2018 08:59
Reddit Daily Programmer - Challenge #221 [Easy] Word snake
//A solution to the r/dailyprogrammer challenge #221 [Easy] Word Snake, done using Rust. Only goes right and down.
use std::io;
fn main() {
println!("Word Snake");
println!("Please enter a sentence");
let mut sentence = String::new();
io::stdin().read_line(&mut sentence)
.expect("Failed to read line");
sentence = sentence.trim().to_string();
@cubetastic33
cubetastic33 / tally_score.rs
Created August 20, 2018 16:22
Reddit Daily Programmer - Challenge #361 [Easy] Tally Program
//A program for the r/dailyprogrammer challenge #361 [Easy] Tally Program, done using Rust.
use std::io;
#[derive(Debug)]
struct ScoreCard {
a: i32,
b: i32,
c: i32,
d: i32,
e: i32,
@cubetastic33
cubetastic33 / word_funnel.rs
Last active August 23, 2018 16:19
Reddit Daily Programmer - Challenge #366 [Easy] Word funnel 1
//A program for the r/dailyprogrammer challenge #366 [Easy] Word Funnel 1, done using Rust.
use std::fs::File;
use std::io;
use std::io::prelude::*;
use std::time::Instant;
fn create_dictionary(filename: &str) -> io::Result<Vec<String>> {
let file = File::open(&filename)?;
let reader = io::BufReader::new(file);
@cubetastic33
cubetastic33 / pancakes.rs
Created August 25, 2018 04:29
Reddit Daily Programmer - Challenge #353 [Intermediate]
//A program for the r/dailyprogrammer challenge #353 [Intermediate], done using Rust.
use std::io;
fn main() {
println!("Let's get the pancakes sorted!");
println!("----");
loop {
let num: usize = get_input().parse().expect("Enter only numbers");
let pancakes = get_input();
//! High-level types and functions related to CSS parsing
use std::{
num::ParseIntError,
fmt,
};
pub use simplecss::Error as CssSyntaxError;
use simplecss::Tokenizer;
use css_parser;
pub use css_parser::CssParsingError;
@cubetastic33
cubetastic33 / play_flac_files.rs
Created May 8, 2019 17:49
A workaround to using claxon to play music with rodio
#![feature(proc_macro_hygiene)]
use inline_python::python;
use rodio::Sink;
fn main() {
let device = rodio::default_output_device().unwrap();
let sink = Sink::new(&device);
let c = inline_python::Context::new();
let file_path = "/path/to/file.flac";