Skip to content

Instantly share code, notes, and snippets.

View chaoky's full-sized avatar
🦩
in a nix rebound phase

Leo chaoky

🦩
in a nix rebound phase
View GitHub Profile
@chaoky
chaoky / animate.css
Last active April 9, 2025 01:10
testing things
.bg {
background: url("https://media.discordapp.net/attachments/486338069331443716/1359323328656965703/Design_sem_nome_4.png?ex=67f71000&is=67f5be80&hm=b5be4c387068726ba96a0cddc7f777d771ceca49b49829a89416f40d874c841a&=&format=webp&quality=lossless&width=1172&height=659");
}
.thing {
background: url("https://media.discordapp.net/attachments/486338069331443716/1359330063686041713/611dddac-3cfc-4d0f-bb3a-0eb385f1a429_removalai_preview.png?ex=67f71646&is=67f5c4c6&hm=b08f6d9ab399e58b05491c48acf4ede5b57a885ee05679da7b25097ce8e8a7a4&=&format=webp&quality=lossless")
repeat 0 0;
height: 1000px;
width: 1000px;
animation: slide 1000s linear infinite;
@chaoky
chaoky / ampify.js
Last active January 15, 2025 02:17
mapsgoogleapis call
[
{
address_components: [
{
long_name: "Atlanta",
short_name: "Atlanta",
types: [
"locality",
"political",
],
@chaoky
chaoky / chart.ts
Last active July 24, 2024 13:06
chartjs configuration
//https://www.chartjs.org/docs/latest/getting-started/
ChartJS.register(
CategoryScale,
LinearScale,
PointElement,
LineElement,
Tooltip,
Filler,
Legend,
);
@chaoky
chaoky / full.nix
Last active April 23, 2024 22:17
expo react native nix derivation and shell
# 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 {
//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;
@chaoky
chaoky / PortugeseAdjectives.js
Last active September 7, 2021 20:03
List of Portugese Adjectives CamelCase
[
'Grande',
'Bom',
'Novo',
'Pequeno',
'Próprio',
'Velho',
'Cheio',
'Branco',
'Longo',
@chaoky
chaoky / circeDecode.scala
Created September 7, 2021 19:27
Decode empty strings to None in scala circe
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)
)
@chaoky
chaoky / main.rs
Last active April 13, 2020 19:50
covid_chart_thingy
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() {
@chaoky
chaoky / emacsclient single gui
Created January 6, 2020 17:26
Emacs will only create a new window if none exist
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
@chaoky
chaoky / .tmux.conf
Created September 30, 2019 23:05 — forked from CSaratakij/.tmux.conf
Tmux's Config that's very close to i3wm (Setting with an idea of using tmux without x-server)
# 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