Skip to content

Instantly share code, notes, and snippets.

View akitaonrails's full-sized avatar

Fabio Akita akitaonrails

View GitHub Profile
@akitaonrails
akitaonrails / links.md
Created November 6, 2019 01:28
Links de referência pro Episódio 66 do Canal Akitando
@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 / BACKEND.md
Last active April 3, 2024 19:49
Codeminer 42 - BACKEND Test

TRZ (The Resident Zombie) - Backend

Problem Description

The world, as we know it, has fallen into an apocalyptic scenario. The "Influenzer T-Virus" (a.k.a. Twiter Virus) is transforming human beings into stupid beasts (a.k.a. Zombies), hungry to cancel humans and eat their limbs.

You, the last survivor who knows how to code, will help the resistance by deploying a system to connect the remaining humans. This system will be essential to detect new infections and share resources between the members.

Requirements

@akitaonrails
akitaonrails / gist:14047
Created October 1, 2008 07:18
CentOS init script for Gitorious' git-daemon
#!/bin/bash
#
# Init file for Gitorious GIT-Daemon daemon
#
# chkconfig: 2345 55 25
# description: GIT-Daemon server daemon
#
# processname: git-daemon
# pidfile: /var/www/gitorious/log/git-daemon.pid
@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>
require 'hpricot'
require 'open-uri'
# update the database with the actual titles from each site
Blog.all.each do |b|
puts b.url
begin
doc = Hpricot(open(b.url.strip))
title = (doc/"html/*/title/").to_s
if title
  • 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

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 '/'
@akitaonrails
akitaonrails / gist:1724673
Created February 2, 2012 17:22 — forked from mattmanning/gist:1430691
Fixing Apachebench on OS X Lion
# If you're getting this error trying to use ApacheBench on OS X Lion:
# Benchmarking mwmanning.com (be patient)...apr_socket_recv: Connection reset by peer (54)
#
# You need to download the latest beta version of Apache and rebuild ab.
# Here's how (assuming you have homebrew installed).
# Install Homebrew (https://github.com/mxcl/homebrew) and then the Perl Regex support
brew install pcre
# Download the latest from http://httpd.apache.org/download.cgi, then decompress and compile it
@akitaonrails
akitaonrails / upgrading-vagrant-fusion.mdown
Created October 24, 2013 17:40
Upgrading Vagrant from the default Virtualbox provider to VMWare Fusion on the Mac

I had some headaches yesterday while trying to upgrade to VMWare Fusion with Vagrant.

The steps that work are:

  • export your boxes from Virtualbox to OVA files
  • run 'vagrant destroy' on all your boxes
  • uninstall Virtualbox using the uninstaller script in the installer DMG
  • download VMWare Fusion
  • run 'vagrant plugin install vagrant-vmware-fusion' to install the provider plugin
  • run 'vagrant plugin license vagrant-vmware-fusion license.lic' to install the license you just bought