Skip to content

Instantly share code, notes, and snippets.

View themaxhero's full-sized avatar
😀

Marcelo Amancio de Lima Santos themaxhero

😀
View GitHub Profile
@themaxhero
themaxhero / Animation.rb
Last active August 29, 2015 14:02
RGSS Animation Class
#===============================================================================
# Util - Animation
#-------------------------------------------------------------------------------
=begin
License - MIT
Copyright (c) 2014 Marcelo Amancio de Lima Santos (maxhero)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@themaxhero
themaxhero / Menu.rb
Last active August 29, 2015 14:02
RGSS Menu Class
#===============================================================================
# Game's Menu
#-------------------------------------------------------------------------------
=begin
License - MIT
Copyright (c) 2014 Marcelo Amancio de Lima Santos (maxhero)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@themaxhero
themaxhero / Form
Created December 1, 2017 21:09
Simple Form
import Html exposing (..)
import Html.Events exposing (..)
import Html.Attributes exposing (..)
import Random
main =
Html.program
{ init = init
@themaxhero
themaxhero / gist:be858c61dbe026e9c7eea3e2a8f760a8
Created December 4, 2017 15:36
Get a element index in a List on Elm for list without duplicates
getElementIndex : a -> List a -> Maybe Int
getElementIndex element list =
let
reducer item (index, found) =
if found then
(index, True)
else
if element == item then
(index, True)
else
@themaxhero
themaxhero / getIndex.elm
Last active December 4, 2017 15:37
Get a element index in a List on Elm for list without duplicates
getElementIndex : a -> List a -> Maybe Int
getElementIndex element list =
let
reducer item (index, found) =
if found then
(index, True)
else
if element == item then
(index, True)
else
#===============================================================================
# Maxhero's Party Editor
#-------------------------------------------------------------------------------
=begin
Terms of Use:
—If use don't forget to quote my name in credits.
—You're free to modify and redistribute this script keeping this Header.
Instructios:
—Edit @REM_BLOCK to set the Party-Fixed Characters
—To enable actors in game use the command:
call plug#begin ("~/.config/nvim/plugged")
Plug 'editorconfig/editorconfig-vim'
Plug 'ryanoasis/vim-devicons'
Plug 'jiangmiao/auto-pairs'
Plug 'mileszs/ack.vim'
Plug 'vim-scripts/todo.vim'
Plug 'vim-ruby/vim-ruby'
Plug 'rust-lang/rust.vim'
Plug 'sickill/vim-monokai'
Plug 'w0rp/ale'
call plug#begin ("~/.config/nvim/plugged")
Plug 'editorconfig/editorconfig-vim'
" -------------------------------- Language Related --------------------------------
Plug 'Quramy/tsuquyomi', {'for': 'typescript'} " Make VIM act like a Typescript IDE
Plug 'plasticboy/vim-markdown' " Markdown Syntax Highlighting
Plug 'hail2u/vim-css3-syntax', {'for': 'css'} " CSS Syntax Highlighting
Plug 'elixir-lang/vim-elixir', {'for': 'elixir'} " Elixir Support
Plug 'vim-ruby/vim-ruby', {'for': 'ruby'} " Ruby Support
Plug 'rust-lang/rust.vim', {'for': 'rust'} " Rust Support
@themaxhero
themaxhero / simple_math.rs
Created August 31, 2019 15:31
Crazy Stuff
use std::convert::{ Into, From };
enum Integer { I8(i8), I16(i16), I32(i32), U8(u8), U16(u16), U32(u32) }
enum Float { F32(f32), F64(f64) }
enum Number { F(Float), I(Integer) }
impl Into<f32> for Integer {
#!/usr/bin/env sh
set -o errexit
VOLUMES=($(lsblk -npo KNAME | grep -v 'loop\|sr'))
SIZES=($(lsblk -npo KNAME,SIZE | grep -v 'loop\|sr' | awk 'BEGIN {FS=" "}; {print $2}'))
COUNT=$(lsblk -n | grep -v 'loop\|sr' | wc -l)
RADIOLIST=()
for i in $(seq 0 $(expr $COUNT - 1));
do