Skip to content

Instantly share code, notes, and snippets.

View ellisonleao's full-sized avatar

Ellison ellisonleao

View GitHub Profile
@ellisonleao
ellisonleao / twitch-irc-with-weechat.mkd
Last active October 30, 2022 12:10 — forked from noromanba/twitch-irc-with-weechat.mkd
How to join Twitch IRC w/ WeeChat
@ellisonleao
ellisonleao / twitch.lua
Created October 7, 2020 14:53
twitch.lua
-- twitch module
local ws = require("http.websocket")
local utils = require("utils")
local M = {}
local twitch_url = "wss://irc-ws.chat.twitch.tv:443"
local message_types = {
PING = "PING",
PRIVMSG = "PRIVMSG",
ACK = "ACK",
@ellisonleao
ellisonleao / zipapp.md
Created October 22, 2019 18:02 — forked from lukassup/zipapp.md
Python zipapp

Python zipapp web apps

What's a zipapp?

This concept is very much like .jar or .war archives in Java.

NOTE: The built .pyz zipapp can run on both Python 2 & 3 but you can only build .pyz zipapps with Python 3.5 or later.

Initial setup

Keybase proof

I hereby claim:

  • I am ellisonleao on github.
  • I am ellison (https://keybase.io/ellison) on keybase.
  • I have a public key ASDsL7MBUFc8m-SAjvqxrKT5a8P81RtMaTf4MccTxv2V5wo

To claim this, I am signing this object:

A Simple, Base16 Friendly, Weechat Setup

Scripts

  • Some must-have scripts
  /script install buffers.pl beep.pl urlserver.py highmon.pl
@ellisonleao
ellisonleao / myweechat.md
Created March 14, 2017 00:29 — forked from pascalpoitras/1.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

Enable mouse support

/mouse enable

Encrypted password in sec.conf

@ellisonleao
ellisonleao / renavam.py
Created December 21, 2016 18:13
Validador Renavam Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
def validar_renavam(renavam):
"""
No caso do RENAVAM, o DV (dígito verificador) módulo 11 é calculado
multiplicando cada dígito do número base pela sequência de multiplicadores
2, 3, 4, 5, 6, 7, 8, 9, 2 e 3, posicionados da direita para a esquerda.
@ellisonleao
ellisonleao / GIF-Screencast-OSX.md
Last active August 29, 2015 14:26 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ellisonleao
ellisonleao / Menu.cs
Created January 30, 2015 18:42
Menu scene
using UnityEngine;
using System.Collections;
public class Menu : MonoBehaviour {
SimpleGameManager GM;
void Awake () {
GM = SimpleGameManager.Instance;
GM.OnStateChange += HandleOnStateChange;
}
@ellisonleao
ellisonleao / Intro.cs
Created January 30, 2015 18:40
Intro Scene
using UnityEngine;
using System.Collections;
public class Intro : MonoBehaviour {
SimpleGameManager GM;
void Awake () {
GM = SimpleGameManager.Instance;
GM.OnStateChange += HandleOnStateChange;