Skip to content

Instantly share code, notes, and snippets.

View airtonzanon's full-sized avatar

Airton Zanon airtonzanon

View GitHub Profile
call plug#begin()
Plug 'ctrlpvim/ctrlp.vim'
Plug 'mkitt/tabline.vim'
Plug 'arcticicestudio/nord-vim'
Plug 'terryma/vim-multiple-cursors'
Plug 'wakatime/vim-wakatime'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'dense-analysis/ale'
call plug#end()
YAML 3:09h - 42.78% ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
SQL 1:29h - 20.23% ▓▓▓▓▓▓▓▓▓▓▓▓
HCL 1:06h - 14.89% ▓▓▓▓▓▓▓▓▓
Docker 0:55h - 12.60% ▓▓▓▓▓▓▓▓
PHP 0:11h - 2.66% ▓▓
Bash 0:08h - 1.82% ▓
gitrebase 0:06h - 1.45% ▓
JSON 0:04h - 0.99% ▓
SmartyConfig 0:03h - 0.77% ▓
Other 0:02h - 0.50% ▓
@airtonzanon
airtonzanon / get_wakatime_to_ascii.py
Last active March 5, 2020 21:11
Get your wakatime spend on languages and create an ascii chart.
import requests, json, os
# To get the WAKATIME_JSON_URL_PER_LANGUAGE
# Go to https://wakatime.com/share/embed, choose JSON format, choose languages chart type
# Click on "Get Embeddable Code", copy the url that it'll show
resp = requests.get(os.environ.get('WAKATIME_URL'))
data = []
for wakadata in resp.json()["data"]:
@airtonzanon
airtonzanon / named_constructor.py
Last active April 28, 2020 21:03
Create named construct with python
class NamedConstructor:
def __init__(self,
name: str,
age: int):
self.name = name
self.age = age
def create_person_from_dict(person_data: dict):
return NamedConstructor(
name = person_data['name'],
@airtonzanon
airtonzanon / init.vim
Last active July 12, 2023 12:59
~/.config/nvim/
call plug#begin()
Plug 'ctrlpvim/ctrlp.vim'
Plug 'mkitt/tabline.vim'
Plug 'arcticicestudio/nord-vim'
Plug 'terryma/vim-multiple-cursors'
Plug 'wakatime/vim-wakatime'
call plug#end()
colorscheme nord
@airtonzanon
airtonzanon / raspberry_pi_zero_w.md
Last active February 19, 2019 09:38 — forked from gbaman/HowToOTGFast.md
Simple guide for start using the Raspberry Pi Zero! With network connection

1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card with etcher. 2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. Create a new file simply called ssh in the SD card as well. By default SSH is now disabled so this is required to enable it. Remember - Make sure your file doesn't have an extension (like .txt etc)!
4. Finally, open up the cmdline.txt. Insert modules-load=dwc2,g_ether after rootwait.
5. That's it, eject the SD card from your computer, put it in your Raspberry Pi Zero and connect it via USB to your computer. It will take up to 90s to boot up (shorter on subsequent boots). It should then appear as a USB Ethernet device. You can SSH into it using raspberrypi.local as the address.
6. If it doesn't work, try to install [bonjour print

@airtonzanon
airtonzanon / TestFizzBuzz.py
Created October 19, 2018 16:13
FizzBuzz implementation
import unittest
from fizzbuzz import FizzBuzz
class TestFizzBuzz(unittest.TestCase):
def test_display(self):
fizzBuzz = FizzBuzz()
self.assertEqual([1, 2, "fizz", 4, 'buzz', "fizz", 7, 8, "fizz", 'buzz', 11, "fizz", 13, 14, "fizzbuzz", 16, 17, "fizz", 19, 'buzz'], fizzBuzz.display())
@airtonzanon
airtonzanon / explanation.md
Created March 10, 2018 13:16
Windows 10 Docker error - Cannot start service

Error on start a docker container (docker run or docker-compose)

Cannot start service driver failed programming external connectivity on endpoint

Error starting userland proxy: mkdir /port/tcp:0.0.0.0:9000:tcp:172.18.0.3:9000: input/output error

  • TL;DR: Go to your docker settings -> daemon -> disable experimental features (This "solved" the problem on 10/03/2018)
ERROR: for docker_webserver_1  Cannot start service webserver: driver failed programming external connectivity on endpoint docker_webserver_1 (969e9ae035707ccbae4e29573d9c07ea32ab2858d48673f3fCreating docker_php-fpm_1   ... error
@airtonzanon
airtonzanon / palestranstes.md
Last active February 18, 2019 14:58
palestrantes PHP

Internacionais

  • Sara Goleman
  • Michelangelo VanDan
  • Rasmus Lerdorf
  • Marco Pivetta
  • Bruno Neves
  • Airton Zanon
  • Ricardo Tulio
  • Taylor Otwell
  • Ben Ramsey
@airtonzanon
airtonzanon / keyboard-toggle.sh
Created May 13, 2017 14:40
Keyboard Disable and Enable Toggle
#!/bin/bash
status=$(xinput list --long "AT Translated Set 2 keyboard" | grep "disabled")
if [[ "$status" =~ "disabled" ]]
then
echo "Enabling keyboard"
xinput enable "AT Translated Set 2 keyboard"
exit;