This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[proc_macro_attribute] | |
pub fn main(_attr: TokenStream, item: TokenStream) -> TokenStream { | |
let input = parse_macro_input!(item as ItemFn); | |
let fn_name = &input.sig.ident; // Function name | |
if fn_name != "main" { | |
panic!("[macro name] can be derived only on main function!"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use floem::reactive::RwSignal; | |
pub enum MaybeSignal<T> | |
where | |
T: 'static, | |
{ | |
Static(T), | |
Signal(RwSignal<T>), | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul .comments { | |
margin-left: 20px !important; | |
} | |
.container-lg { | |
width: 100% !important; | |
} | |
main, | |
.create-post { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
CONFDIR="/etc/wireguard/" | |
readarray -t AVAILABLE_INTERFACES < <(ls $CONFDIR | awk -F '.' '{print $1}') | |
readarray -t ACTIVE_INTERFACES < <(wg show | grep 'interface: ' | awk -F 'interface: ' '{print $2}') | |
list_available_interfaces() | |
{ | |
for i in "${!AVAILABLE_INTERFACES[@]}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local awful = require('awful') | |
local beautiful = require('beautiful') | |
local gears = require('gears') | |
local json = require('util.json') | |
local confdir = gears.filesystem.get_configuration_dir() | |
local icons = require('theme.icons').taglist | |
-- File |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CURRENT_SINK=$(pactl info | grep 'Default Sink' | awk -F ':' '{print $2}') | |
readarray -t SINKS < <(pactl list sinks | grep 'Name: ' | awk -F ':' '{print $2}') | |
IGNORE_SINKS=() | |
VALID_SINKS=() |