Skip to content

Instantly share code, notes, and snippets.

#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1,preferred,0x0,1,bitdepth,10,vrr,1,transform,0
monitor=,preferred,auto,1
@anlumo
anlumo / string_calculator.rs
Created September 28, 2023 22:25
Rust Vienna Dojo 2023-09-28
#![warn(clippy::pedantic)]
#![warn(clippy::all)]
/// # Panics
/// when negative value is passed
#[must_use]
pub fn add(numbers: &str) -> usize {
let (seperators, content) = if let Some(line) = numbers.strip_prefix("//") {
let (seperators_str, content_str) = line.split_once('\n').unwrap();
if seperators_str.starts_with('[') {
pub async fn run(mut self) -> Result<(), Box<dyn std::error::Error>> {
loop {
match select(self.stream.next(), self.channel.next()).await {
Either::Left((Some(Ok(message)), _)) => {
match message {
Message::Text(txt) => {
debug!("[{}] Received message: {:?}", self.uuid, txt);
},
Message::Binary(bin) => {
debug!("[{}] Received binary message: {:?}", self.uuid, bin);
@anlumo
anlumo / adapters.application.js
Last active March 4, 2019 00:01
Self-Referencing Relationships
import DS from 'ember-data';
export default DS.Adapter.extend({
});
@anlumo
anlumo / Volumetric.shader
Created April 8, 2017 01:32
Implicit surface shader for Unity
Shader "Own/Volumetric" {
Properties {
_Radius ("Radius", Float) = 1.0
_Center ("Center", Vector) = (0.0, 0.0, 0.0, 0.0)
_Color ("Color", Color) = (1.0, 0.0, 0.0, 1.0)
_SpecularPower ("Specular Power", Float) = 20.0
_Gloss ("Gloss", Float) = 5.0
}
SubShader {
Tags { "RenderType"="Opaque" }
@anlumo
anlumo / gist:01f6c3329a1941c82a33
Created April 29, 2015 19:04
Slow HTMLBars snippet
<svg xmlns="http://www.w3.org/2000/svg" width="1362" height="1054.368239865809" viewBox="-1059.5668029785156 -392.83802746346527 1362 1054.368239865809">
<g id="ember979" class="ember-view" transform="translate(40.433197021484375,288.5516052246094)"> <g id="ember984" class="ember-view" transform="translate(-141,125)"> <g id="ember989" class="ember-view" transform="translate(-167,-170.5)"> <g id="ember994" class="ember-view" transform="translate(-167,0)"> <g id="ember999" class="ember-view" transform="translate(-167,0)"> <g id="ember1004" class="ember-view" transform="translate(-167,0)"> <g id="ember1009" class="ember-view" transform="translate(-240.99996948242188,-0.318878173828125)"><!----> <path fill="none" stroke-opacity="1" stroke-linecap="round" stroke="rgba(175, 54, 242, 1.0)" d="M250.49996948242188,26.818878173828125C214.69998168945312,26.818878173828125,196.79998779296875,26.5,161,26.5" stroke-width="1"></path>
</g>
<path fill="none" stroke-opacity="1" stroke-linecap="round" stroke="rgba(17