Skip to content

Instantly share code, notes, and snippets.

View akitaonrails's full-sized avatar

Fabio Akita akitaonrails

View GitHub Profile
@akitaonrails
akitaonrails / build_ffmpeg_command.py
Created November 5, 2024 02:24
Try to convert Netflix videos into an open MKV format
# Procedure:
# - download the episodes you want from the Android Netflix app (there is a limit)
# - connect your smartphone to your PC and navigate to Internal Storage/Android/data/com.netflix.mediaclient/Download/.of.
# - fetch each directory (each directory is one episode)
#
# Each directory should have the following file formats:
# - .nfv - the video stream, possibly already in H.264, unencrypted
# - .nfa - the most difficult file to deal with, it's an unencrypted AAC file in ISO fMP4 (fragmented) format and an unknown "object type 42" that ffmpeg complains
# - .nfs - subtitle in TTML format with custom properties.
# - .nfi - information about the download (unknown format)
@akitaonrails
akitaonrails / application.scss
Created April 3, 2024 18:48
AkitaOnRails.com Main SCSS
@import 'bootstrap/scss/bootstrap';
@import "normalize-scss";
@-ms-viewport {
width: device-width;
}
@viewport {
width: device-width;
}
@akitaonrails
akitaonrails / win11.xml
Created January 17, 2023 16:29
My Windows 11 libvirt XML configuration
<domain type='kvm'>
<name>win11-real</name>
<uuid>45768371-b871-4937-b7c2-60ed835011de</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>33554432</memory>
<currentMemory unit='KiB'>33554432</currentMemory>
  • 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 November 6, 2019 01:28
Links de referência pro Episódio 66 do Canal Akitando
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] ???
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 '/'
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":["[email protected]","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 20:01
Attempt to implement a Pipe operator-like behavior in Crystal
# 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}}
@akitaonrails
akitaonrails / concurrency_2.cr
Last active May 29, 2016 03:47
Go to Crystal: Concurrency Tour #2 (https://tour.golang.org/concurrency/2)
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)
}