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 / split_midi_tracks.rb
Last active August 29, 2015 14:14
Batch split multi-part MIDI files into single-part MIDI files.
require 'fileutils'
require 'midilib/sequence'
require 'midilib/io/midifile'
DEBUG = false
LOGGING = true
LOG_FILE = Dir.pwd + '/error.log'
INPUT_DIR = './vgm/'
OUTPUT_DIR = '../split'
@monomadic
monomadic / advtool.rb
Last active August 29, 2015 14:19
ableton_tools
#!/usr/bin/env ruby
require 'nokogiri'
require 'fileutils'
require 'zlib'
require 'colorize'
INPUT_FILE = ARGV[0]
PROJECT_NAME = (ARGV[1].nil? || ARGV[1].empty?) ? nil : ARGV[1] # dirty but necessary unforch. ruby sucks.
OUTPUT_DIR = "./_output"
@monomadic
monomadic / mac.sh
Last active August 10, 2022 04:50
Forked from another file and documented, each entry on a new line to provide easy commenting / disabling of lines.
#!/bin/bash
# PRO TIP: Don't disable shit until you know exactly what it does. Remember that disabling doesn't kill the process, so most tweaks you need to reboot to fully see effects.
# MINI TUTORIAL ON LAUNCHCTL
# List all jobs in system:
# launchctl list
# first column is the process id, or - if the job is not loaded. second is exit code.
@monomadic
monomadic / SortableTable.elm
Created September 15, 2018 13:35
elm - sortable-table example
module Main exposing (Model, Msg(..), Person, config, init, main, presidents, update, view)
import Browser
import Html exposing (Html, div, h1, input, text)
import Html.Attributes exposing (placeholder)
import Html.Events exposing (onInput)
import Table
main =
Browser.element
@monomadic
monomadic / decodeFloatToInt.elm
Last active October 7, 2018 08:52
Convert a float to an int with JSON.Decode
import Json.Decode as Decode
type alias CoinPair = { pair: String, price: Float, rsi_15m: Int }
decodeCoinPair : Decode.Decoder CoinPair
decodeCoinPair =
Decode.map5 CoinPair
(Decode.field "pair" Decode.string)
(Decode.field "price" Decode.float)
(Decode.field "rsi_15m" decodeFloatAsInt)
@monomadic
monomadic / main.rs
Created December 25, 2018 11:45
Window with NSEvent delegate in rust.
extern crate cocoa;
#[macro_use]
extern crate objc;
use cocoa::appkit::*;
use cocoa::base::*;
use cocoa::foundation::*;
use objc::runtime::*;
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};
@monomadic
monomadic / The Scalping Handbook.md
Last active June 8, 2024 19:58
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.

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 / Options.md
Last active October 1, 2019 00:49
Rust AST Traversal Options