Skip to content

Instantly share code, notes, and snippets.

Avatar

Airton Zanon airtonzanon

View GitHub Profile
View gist:00b83de183e5fcde3661
Verifying that +airtonzanon is my blockchain ID. https://onename.com/airtonzanon
@airtonzanon
airtonzanon / developer-mode.md
Last active Oct 18, 2016
Enable Developer Mode Chromebook
View developer-mode.md

#How enable Developer Mode Chromebook

Warning

  • When you enable developer mode all of your files, directorys and accounts will be deleted.
  • Google doesn't support your Chromebook in developer mode.

Enabling

  • Turn on your Chromebook.
View PessoaModel.php
<?php
class Pessoa {
private $nome;
private $sexo;
private $idade;
public function __construct($nome = null, $sexo = null, $idade = null){
$this->nome = $nome;
@airtonzanon
airtonzanon / exim-commands.md
Last active Oct 25, 2016
Some Exim Commands
View exim-commands.md

Some Exim Commands

  • exim -bp or mailq - List queue
  • exim -bpc - Count e-mails in queue
  • exim -qff - Force try to send queue, even freeze e-mails (if you use -qf, just try to send queue without freeze e-mails)
  • exiqgrep -i -z | xargs exim -Mrm - Remove all freeze e-mails from queue - if you use without -z, you can remove all e-mails from queue
  • exim -Mrm message-id - Remove a message from queue
  • exim -Mvh message-id - View a message's header
  • exim -Mvb message-id - View a message's body
  • exim -v -M message-id - Try to send again some message
@airtonzanon
airtonzanon / v-exim-queue-12later
Last active Oct 26, 2016
E-mail log para verificar a fila do exim (emails que estão por mais de 12 horas nela)
View v-exim-queue-12later
#!/bin/bash
# info: Send email log to email
# options: NONE
#
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@airtonzanon
airtonzanon / keyboard-toggle.sh
Created May 13, 2017
Keyboard Disable and Enable Toggle
View keyboard-toggle.sh
#!/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;
@airtonzanon
airtonzanon / explanation.md
Created Mar 10, 2018
Windows 10 Docker error - Cannot start service
View explanation.md

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 / TestFizzBuzz.py
Created Oct 19, 2018
FizzBuzz implementation
View TestFizzBuzz.py
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())
View palestranstes.md

Internacionais

  • Sara Goleman
  • Michelangelo VanDan
  • Rasmus Lerdorf
  • Marco Pivetta
  • Bruno Neves
  • Airton Zanon
  • Ricardo Tulio
  • Taylor Otwell
  • Ben Ramsey