Skip to content

Instantly share code, notes, and snippets.

View monomadic's full-sized avatar
♥️
rust and crypto

Monomadic monomadic

♥️
rust and crypto
  • Nomadic
View GitHub Profile
@monomadic
monomadic / yew-callbacks-generic.rs
Last active July 16, 2022 12:07
yew example of component communication using callbacks
use std::fmt::Display;
use yew::prelude::*;
use yew::{function_component, html, Callback, Html, Properties};
#[derive(Properties, PartialEq)]
pub struct Props<T: PartialEq + Clone + Display> {
pub onselect: Callback<T>,
pub items: Vec<T>,
}
{
"name": "Pico-8 Poom",
"symbol": "",
"description": "It's poom poom!",
"seller_fee_basis_points": 500,
"image": "https://www.arweave.net/43xtSbpMnBs9svYNT3gGajHD3NctDsTs_pRT9NQvHz4?ext=png",
"attributes": [
{
"trait_type": "",
"value": "fps"
@monomadic
monomadic / nix-shell-winit.md
Last active December 6, 2022 18:43
Creating and compiling a Rust X11 GUI application with Winit under NixOS

Creating and compiling a Rust GUI application under NixOS

Using a Nix-Shell

{ pkgs ? import <nixpkgs> { }, lib ? pkgs.stdenv.lib }:

pkgs.mkShell rec {
  name = "rust-env";
@monomadic
monomadic / fusion.md
Last active April 13, 2020 17:00 — forked from probonopd/fusion.md

Blackmagic Design Fusion using AppImage

Recently I was informed that Blackmagic Design is using AppImage to distribute Fusion for Linux. So I had a look, and what I found is rather surprising. They hide the fact that they are using AppImage (using .run rather than .AppImage as an extension), and they do not make use of it advantages because they a) encapsulate it in an archive, making unarchiving necessary, and b) run an installer. So they throw away two advantages of AppImages: a) that they do not need to be unpacked, and b) that they do not need to be installed.

What the heck?!

Starting the analysis

I am doing this analyis on Ubuntu 16.04.

@monomadic
monomadic / home.nix
Created January 24, 2020 18:02
Nix Config
{ config, pkgs, ... }:
{
programs.home-manager.enable = true;
home.packages = [
pkgs.htop # performance monitor
pkgs.ranger # file manager
pkgs.broot # awesome file manager, sorter, finder
pkgs.fzf # fuzzy finder
@monomadic
monomadic / Options.md
Last active October 1, 2019 00:49
Rust AST Traversal Options

Keybase proof

I hereby claim:

  • I am robsaunders on github.
  • I am deathdisco (https://keybase.io/deathdisco) on keybase.
  • I have a public key ASAws01Bd1bSXUdyMmEo8ARezIBd4uqgegS8hbGYigHQKQo

To claim this, I am signing this object:

@monomadic
monomadic / The Scalping Handbook.md
Last active April 25, 2024 16:56
The Scalping Handbook

The Scalping Handbook

Rule 1: Follow the trend

  • in an upward trending market, bullish TA works and bearish TA fails.
  • in a downward trending market, bearish TA works and bullish TA fails.

To determine the trend, use moving averages, channel S/R, and price highs/lows.

A good starter to determine trend is to use the 200ma. You need to see higher highs and higher lows, even on your trade timeframe. For example, if there are higher highs on the 1h and 1d, but on the 1m you're seeing lower highs, don't trade until you do see at least one.

extern crate cocoa;
extern crate rtb_rs;
use cocoa::base::{selector, nil, NO};
use cocoa::foundation::{NSRect, NSPoint, NSSize, NSAutoreleasePool, NSProcessInfo,
NSString};
use cocoa::appkit::{NSApp, NSApplication, NSApplicationActivationPolicyRegular, NSWindow,
NSBackingStoreBuffered, NSMenu, NSMenuItem, NSWindowStyleMask,
NSRunningApplication, NSApplicationActivateIgnoringOtherApps};