Skip to content

Instantly share code, notes, and snippets.

View SrTobi's full-sized avatar

Tobias Kahlert SrTobi

View GitHub Profile
@SrTobi
SrTobi / neo-rus
Last active February 5, 2021 09:58
xkb layout for russian cyrilic letters on neo layout
//default partial alphanumeric_keys modifier_keys keypad_keys
//xkb_symbols "neo_rus" {
//
// include "de(neo_base)"
//
// name[Group1]= "Russian (Neo 2)";
//
// include "shift(both_capslock)"
// include "level3(caps_switch)"
// include "level3(bksl_switch)"
@SrTobi
SrTobi / jetbrains-toolbox.nix
Last active August 29, 2022 23:31
Example of a custom package for your configuration.nix
{ pkgs, stdenv, fetchurl, ... }:
let
name = "jetbrains-toolbox";
version = "1.16.6319";
#version = "1.18.7455";
sha256 = "4e6f333839af8330a09d9d6fdcd6a635c9ca1f0ae239d8f268249dbd095ca880";
jetbrains-toolbox-src = stdenv.mkDerivation {
name = "${name}-src";
trait HList: Sized {
fn len(&self) -> u32;
fn push<T>(self, value: T) -> Cons<T, Self>;
}
struct Cons<Head, Tail> where Tail: HList {
pub head: Head,
pub tail: Tail
}
var nextId = 1
var idToEntry = new Map()
var objectToId = new Map()
function record(obj) {
if (obj === null) {
return {
type: "null"
}
}
@SrTobi
SrTobi / Venator-raw.xml
Created March 5, 2017 09:18
Full and Raw Variant of the Venator-class Star Destroyer model for avorion
<?xml version="1.0" encoding="utf-8"?>
<ship accumulateHealth="true" convex="false">
<item parent="1416" index="1432" maxDurability="0.486017346" currentDurability="0.486017346">
<block lowerX="2.19999886" lowerY="16.7000084" lowerZ="-113.250008" upperX="3.00000095" upperY="16.900013" upperZ="-112.950005" index="100" material="4" look="4" up="3" color="ffbfada3"/>
</item>
<item parent="1053" index="1436" maxDurability="504.224243" currentDurability="504.224243">
<block lowerX="-0.5" lowerY="3.49999905" lowerZ="-121.149994" upperX="1.5" upperY="9.49999905" upperZ="-117" index="100" material="4" look="2" up="4" color="ffbfada3"/>
</item>
<item parent="263" index="685" maxDurability="4763.66699" currentDurability="4763.66699">
<block lowerX="23" lowerY="-1.00000131" lowerZ="-116.799995" upperX="23.5" upperY="0.999998331" upperZ="-115.299995" index="104" material="5" look="0" up="5" color="ffbc9f9f"/>
module Everything where
{- replicate does not support integer :/ -}
repl :: Integer -> Integer -> [Integer]
repl x times = [x | i <- [1..times]]
{- take needs Int as well -}
myTake :: Integer -> [a] -> [a]
myTake len [] = []
myTake 0 xs = []