Skip to content

Instantly share code, notes, and snippets.

View GoldsteinE's full-sized avatar

Max “Goldstein” Siling GoldsteinE

View GitHub Profile
@GoldsteinE
GoldsteinE / colors.vim
Last active February 24, 2020 00:38
for r/unixporn
" It's not a real config, but the hi commands from my actual ~/.vimrc
" Base color scheme: https://github.com/gosukiwi/vim-atom-dark
colorscheme atom-dark
hi VertSplit ctermbg=NONE guibg=NONE guifg=#455354
hi CursorLine term=NONE cterm=NONE
hi SpellCap guibg=#383900
hi SpellBad guibg=#661400
hi Pmenu guibg=#2d3135 guifg=#a0d1d9
hi PmenuSel guibg=#818890
hi PmenuSbar guibg=#121315
#include <cstdio>
#include <climits>
int square(int num) {
int k = 0;
while (true) {
if (k == num * num) {
return k;
}
k += 2;
const WINDOW_SIZE: usize = 10;
struct FloatingWindow<'a> {
data: [i64; WINDOW_SIZE],
start_index: usize,
current_size: usize,
}
impl<'a> FloatingWindow<'a> {
pub fn at(&self, idx: usize) -> i64 {
const WINDOW_SIZE: usize = 10;
struct FloatingWindow<'a> {
data: [i64; WINDOW_SIZE],
start_index: usize,
current_size: usize,
}
impl<'a> FloatingWindow<'a> {
pub fn at(&self, idx: usize) -> i64 {
use std::marker::PhantomData;
const WINDOW_SIZE: usize = 10;
struct FloatingWindow<'a> {
data: [i64; WINDOW_SIZE],
start_index: usize,
current_size: usize,
phantom: PhantomData<&'a i32>
}
const WINDOW_SIZE: usize = 10;
struct FloatingWindow {
data: [i64; WINDOW_SIZE],
start_index: usize,
current_size: usize,
}
impl FloatingWindow {
pub fn at(&self, idx: usize) -> i64 {
use std::io;
const WINDOW_SIZE: usize = 10;
struct FloatingWindow {
data: [i64; WINDOW_SIZE],
start_index: usize,
current_size: usize,
}
#![feature(core_intrinsics)]
use std::fmt;
use std::io::{self, Write};
use std::intrinsics::likely;
const WINDOW_SIZE: usize = 10;
const UPPER_BOUND: usize = 10;
struct FloatingWindow {
@GoldsteinE
GoldsteinE / test.c
Created September 2, 2019 20:30
???
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
typedef char bool;
static const bool false = 0;
static const bool true = 1;
bool primep(uint64_t n) {
if (n == 2) {
[INFO][amethyst::app] Initializing Amethyst...
[INFO][amethyst::app] Version: 0.13.2
[INFO][amethyst::app] Platform: x86_64-unknown-linux-gnu
[INFO][amethyst::app] Amethyst git commit: 38f04eb5709f892d9bdaed3a23ea1c5235584663
[INFO][amethyst::app] Rustc version: 1.38.0-nightly Nightly
[INFO][amethyst::app] Rustc git commit: 60960a260f7b5c695fd0717311d72ce62dd4eb43
[INFO][winit::platform::platform::x11::window] Guessed window DPI factor: 1.5
[WARN][gfx_backend_vulkan] Unable to find extension: VK_KHR_wayland_surface
[WARN][rendy_factory::factory] Slow safety checks are enabled! Disable them in production by enabling the 'no-slow-safety-checks' feature!
[INFO][rendy_util::wrap] Slow safety checks are enabled! You can disable them in production by enabling the 'no-slow-safety-checks' feature!