Skip to content

Instantly share code, notes, and snippets.

View luciusmagn's full-sized avatar
💭
:^)

Lukáš Hozda [magnusi] luciusmagn

💭
:^)
View GitHub Profile
@luciusmagn
luciusmagn / minecraft.c
Created October 4, 2021 10:18
THIS IS MINECRAFT
```c
#define So long
#define R rand()
#include <math.h>
#include <X11/Xlib.h>
#define T(i,F) ((So long)(i)<<F)
#define O(c,L,i) c*sin(i)+L*cos(i)
#define y(n,L) for(n=0; n<L 3; n++)
#define P(v,L) d=0; y(l,)d+=T(L*l[v],l*20);
#define X(q) q>>10&63|q>>24&4032|q>>38&258048
# code
face global value rgb:d28546,default
face global type rgb:f4c076,default
face global identifier rgb:699eb5,default
face global string rgb:f497b3,default
face global error rgb:d28546,rgb:ffffff
face global keyword rgb:aa749f,default+b
face global operator rgb:dedede,default
face global attribute rgb:b66364,default
rs, py, go, js, html, css, c, cc, cpp, sh, fish: "kcr open --client client0 --session braiins"
toml, yaml, yml, json, ron, ini, conf, txt, md, kak: "kcr open --client client0 --session braiins"
format = """
╭\\[$memory_usage\\]$python [$directory](bold cyan)($git_branch$git_state$git_status)$rust$package${custom.tab}${custom.tax} $jobs
╰ $time $hostname $username $cmd_duration[»](bold green) """
[git_branch]
style = "bold green"
format = "[\\[[$branch$tag](bold green)\\]](bold white)"
[git_status]
@luciusmagn
luciusmagn / 0001-add-global-config-functionality.patch
Last active April 30, 2021 07:32
contains config and patch to allow global configuration (I opened a PR for it, so it might not be needed)
From 61cfdbc162329ab730378df71a52e507cb2caafc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hozda?= <luk.hozda@gmail.com>
Date: Fri, 30 Apr 2021 09:28:09 +0200
Subject: [PATCH] add global config functionality
---
Cargo.lock | 21 +++++++++++++++++++++
Cargo.toml | 1 +
src/mission.rs | 20 ++++++++++----------
3 files changed, 32 insertions(+), 10 deletions(-)
@luciusmagn
luciusmagn / alacritty.yml
Created April 30, 2021 07:23
You will probably need to change the font or ask me for it
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
use atomic_counter::ConsistentCounter;
use bump_alloc::BumpAlloc;
use commander_rust::{command, entry, run};
use libc::{clock_gettime, timespec, CLOCK_MONOTONIC};
use nix::{
sched::{sched_setaffinity, CpuSet},
unistd::Pid,
};
use rayon::prelude::*;
//! Modul obsahující makra pro zjednodušené odpovědi
//! Typ Response je mnohem více intuitivní než Option<status::Custom<http::Status, Json<T>>>
//! bylo, takže tyto makra nejsou úplně nutná, byť zjednodušují práci
/// Makro pro odpověď `200 OK`
#[macro_export]
macro_rules! ok {
() => {{
reapi::Response::ok()
}};
@luciusmagn
luciusmagn / smycky.c
Last active October 12, 2020 11:13
zkompilovano a funguje s `gcc smycky.c && ./a.out`
#include <stdio.h>
main(argc, argv)
int argc;
char** argv;
{
int i = 0;
goto HOP_DO_SMYČKY;
@luciusmagn
luciusmagn / cisla.c
Created October 1, 2020 13:50
cisla
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int cmp(const void* a, const void* b) { return (*(int*)a - *(int*)b); }
main(int argc, char** argv) {
int a, b, c; int pos; int arr[3];
return (argc < 4
? 1