Skip to content

Instantly share code, notes, and snippets.

Fabio Akita akitaonrails

View GitHub Profile
View Arch in WSL2.md
  • Se quiser/precisar rodar VMWare Workstation lado a lado com WSL 2, a partir da versão 15.5.5 do Workstation com o Windows 10 20H1 build 19041.264 (Insider Slow Ring ou Preview Release).

Além disso na configuração da VM no WMWare precisa desabilitar os checkboxes na configuração de processadores, como a opção "Virtualize Intel VT-x/EPT or AMD-V/RVI"

https://blogs.vmware.com/workstation

  • Instale a feature Windows Subsystem for Linux normalmente.

  • Baixe o zip do Arch2 e deszipe por exemplo em C:\Users[seu usuario]\AppData\Local. E da pasta deszipada execute o Arch2.exe pra terminar de instalar

@akitaonrails
akitaonrails / links.md
Created Nov 6, 2019
Links de referência pro Episódio 66 do Canal Akitando
View links.md
View output.txt
Unhandled exception: Cannot allocate new fiber stack: Cannot allocate memory (Errno)
GC Warning: Failed to expand heap by 2834432 bytes
GC Warning: Failed to expand heap by 790528 bytes
GC Warning: Out of Memory! Heap size: 5 MiB. Returning NULL!
Invalid memory access (signal 11) at address 0x60018
[0x5614ba5a4176] ???
[0x5614ba5a3e8f] __crystal_sigfault_handler +479
[0x7fd6dde91890] ???
[0x5614ba5931d5] ???
[0x5614ba59259b] ???
View kubectl.zsh
setopt prompt_subst
autoload -U add-zsh-hook
function() {
local namespace separator modified_time_fmt
# Specify the separator between context and namespace
zstyle -s ':zsh-kubectl-prompt:' separator separator
if [[ -z "$separator" ]]; then
zstyle ':zsh-kubectl-prompt:' separator '/'
View erro no minerx.notifications
I, [2017-10-23T15:09:33.083276 #253] INFO -- : Connected to AMQP broker (prefetch: default)
I, [2017-10-23T15:09:42.797137 #253] INFO -- : Received: {"mailer_class":"TokenMailer","method":"activation","args":["fabio.akita@minerx.com.br","42473f74aa56ad1164fbf9389f617b50"],"locale":"en"}
F, [2017-10-23T15:09:42.797362 #253] FATAL -- : wrong number of arguments (given 3, expected 0) (ArgumentError)
/usr/local/bundle/gems/actionmailer-5.0.6/lib/action_mailer/base.rb:582:in `initialize'
/app/app/models/worker/email_notification.rb:12:in `new'
/app/app/models/worker/email_notification.rb:12:in `process'
/app/lib/daemons/amqp_daemon.rb:61:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/bunny-1.2.2/lib/bunny/consumer.rb:56:in `call'
/usr/local/bundle/gems/bunny-1.2.2/lib/bunny/channel.rb:1672:in `block in handle_frameset'
/usr/local/bundle/gems/bunny-1.2.2/lib/bunny/consumer_work_pool.rb:84:in `block (2 levels) in run_loop'
@akitaonrails
akitaonrails / cr_chainable_methods.cr
Last active May 30, 2016
Attempt to implement a Pipe operator-like behavior in Crystal
View cr_chainable_methods.cr
# this was copied from https://carc.in/#/r/fg2
# thanks to @waterlink from this issue thread https://github.com/crystal-lang/crystal/issues/1388
module CrChainableMethods
module Pipe
macro pipe(ast)
{% uast = ast.stringify.gsub(/ >>/, ".pipe").id %}
{% pp uast %}
{% if uast.stringify != ast.stringify %}
pipe {{uast}}
View concurrency_2.cr
def sum(s : Array(Int32), c : Channel(Int32))
c.send s.reduce(0) { |sum, v| sum + v }
end
def main
s = [7, 2, 8, -9, 4, 0]
c = Channel(Int32).new
spawn {
sum(s[0..((s.size / 2) - 1)], c)
}
@akitaonrails
akitaonrails / fake_pipe_operations.rb
Last active Feb 18, 2016
Simple Pipe like Operations in Ruby
View fake_pipe_operations.rb
module Pipe
def pipe(initial_state)
Pipe::PipeChain.new(initial_state, self)
end
class PipeChain
attr_reader :state, :context
def initialize(object, context)
@state = object
View gist:4c2013709448aa58b7be
remote: Verifying deploy....
remote:
remote: ! Push rejected to premiosonline.
remote:
To https://git.heroku.com/premiosonline.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/premiosonline.git'
@akitaonrails
akitaonrails / Cargo.toml
Last active Aug 29, 2015
playing around with Rust
View Cargo.toml
[package]
name = "actors"
version = "0.1.0"
authors = ["vagrant"]
[dependencies]
regex = "0.1.8"
You can’t perform that action at this time.