This file contains 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
//https://www.chartjs.org/docs/latest/getting-started/ | |
ChartJS.register( | |
CategoryScale, | |
LinearScale, | |
PointElement, | |
LineElement, | |
Tooltip, | |
Filler, | |
Legend, | |
); |
This file contains 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
# I'm using a wrapped mkNodeModules for pnpm support | |
# mkYarnModules and importNpmLock are avaible for yarn/npm in nixpkgs | |
# also using chaoky/gradle-dot-nix fork for the local-repos option | |
{ pkgs, utils, gradle-dot-nix }: | |
let | |
nodejs = pkgs.nodejs_21; | |
pnpm = pkgs.nodePackages.pnpm; | |
java = pkgs.jdk17; | |
androidPkgs = pkgs.androidenv.composeAndroidPackages { |
This file contains 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
//from: https://github.com/GenezysDigitalAssets/clashofcars-node-service/blob/main/src/routes/get_player_data.ts | |
use actix_web::{ | |
get, | |
web::{Data, Json}, | |
App, HttpServer, Result, | |
}; | |
use serde::{Deserialize, Serialize}; | |
use solana_account_decoder::parse_token::UiTokenAmount; | |
use solana_client::nonblocking::rpc_client::RpcClient; | |
use solana_program::pubkey::Pubkey; |
This file contains 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
[ | |
'Grande', | |
'Bom', | |
'Novo', | |
'Pequeno', | |
'Próprio', | |
'Velho', | |
'Cheio', | |
'Branco', | |
'Longo', |
This file contains 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
given emptyStringToNull[A](using d: Decoder[A]): Decoder[Option[A]] = | |
Decoder.decodeOption.prepare(cursor => | |
cursor.withFocus(json => if json.toString == "\"\"" then Json.Null else json) | |
) |
This file contains 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 quicksilver::{ | |
geom::{Rectangle, Vector}, | |
graphics::{Color, Graphics}, | |
lifecycle::{run, EventStream, Settings, Window}, | |
Result, | |
}; | |
use iced::{button, Align, Button, Column, Element, Sandbox, Text}; | |
use iced::Settings as IcedS; | |
fn main() { |
This file contains 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
e() { | |
#return a list of all frames on $DISPLAY | |
emacsclient -e "(frames-on-display-list \"$DISPLAY\")" &>/dev/null | |
if [ $? -eq 0 ]; then | |
emacsclient -n "$@" | |
else | |
emacsclient -nc "$@" | |
fi |
This file contains 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
# Config that is very close to a i3 window manager's keybinding. | |
set -s escape-time 0 | |
setw -g aggressive-resize on | |
# First remove *all* keybindings | |
unbind-key -a | |
# List keys | |
bind-key ? list-keys |
This file contains 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
First, install arch-install-scripts: | |
sudo pacman -S --needed arch-install-scripts | |
Secondly, mount your partitions in all the internal hard drives. | |
Thirdly, generate and validate your config by piping it out to stdout: | |
genfstab -U -p / | less |
This file contains 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
~ 3s press to enter the menu/exit/select/confirm | |
~ 1s press to cicle thought options | |
---- MENU ------ | |
1 - Max temp 1 | |
2 - Min temp 2 (based on max temp) | |
3 - Fake temp (based on max temp) | |
5 - Cicle duration |
NewerOlder