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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
let regex; | |
/* matching a specific string */ | |
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
/* wildcards */ | |
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
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 |
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
# 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
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
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
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
[ | |
'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
//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; |
OlderNewer