Skip to content

Instantly share code, notes, and snippets.

View vmakoed's full-sized avatar

Viktar Makayed vmakoed

View GitHub Profile
@vmakoed
vmakoed / machine.js
Created January 13, 2021 12:34
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@vmakoed
vmakoed / script.rb
Created July 2, 2019 11:36
A ruby script with deliberate styleguide offenses
class Histogram_Generator
def initialize
end
def self.processString(string:)
result = if !string.empty?
string.gsub( /[ ,.\r\n]/, " " ).split( " " ).each_with_object( Hash.new(0) ) {|word, result| result[word]+=1};

Keybase proof

I hereby claim:

  • I am vmakoed on github.
  • I am rubybit (https://keybase.io/rubybit) on keybase.
  • I have a public key ASAz-sHtjunw_6J7t1yxcfQYJIdhXP1B4EBDWSv9AaypkQo

To claim this, I am signing this object:

@vmakoed
vmakoed / generator.rb
Last active March 26, 2018 15:11
Strong Parameters Generator
#TODO: delete after protected attributes migration to strong params is complete
module StrongParams
module Tools
# use #model_params method from this module to get a nice hash of params ready to be
# injected into a params filter of a Rails controller.
# Works with nested_attributes. Takes reflections into account.
module Generator
module_function
#
# Example:
@vmakoed
vmakoed / cloudSettings
Created March 1, 2018 19:56 — forked from spencercarli/bd3d4befe38185704bf0fc875e9deed6|configuration.json
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-02-22T16:57:23.288Z","extensionVersion":"v2.8.7"}