Skip to content

Instantly share code, notes, and snippets.

✔️
python -c "import this"

William Canin williamcanin

✔️
python -c "import this"
Block or report user

Report or block williamcanin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@williamcanin
williamcanin / rundev.sh
Created Sep 17, 2019
Shell file for managing Python packages.
View rundev.sh
#!/usr/bin/env bash
# File for managing Python packages.
# by: William Canin, 2019
# Enter the package name
__progname__=""
# Enter the shell file name you use (.bashrc or .zshrc)
__config_shell__="" # Usage: .bashrc | .zshrc
@williamcanin
williamcanin / VSCodeExtension.py
Created Feb 16, 2019 — forked from cra0zy/VSCodeExtension.py
VSCode extension for Nautilus
View VSCodeExtension.py
# VSCode Nautilus Extension
#
# Place me in ~/.local/share/nautilus-python/extensions/,
# ensure you have python-nautilus package, restrart Nautilus, and enjoy :)
#
# Quick install command:
# mkdir -p ~/.local/share/nautilus-python/extensions && cp -f VSCodeExtension.py ~/.local/share/nautilus-python/extensions/VSCodeExtension.py && nautilus -q
#
# Quick download + install command:
# wget https://gist.githubusercontent.com/cra0zy/f8ec780e16201f81ccd5234856546414/raw/6e53c15ea4b18de077587e781dc95dc7f0582cc3/VSCodeExtension.py && mkdir -p ~/.local/share/nautilus-python/extensions && cp -f VSCodeExtension.py ~/.local/share/nautilus-python/extensions/VSCodeExtension.py && rm VSCodeExtension.py && nautilus -q
@williamcanin
williamcanin / Sublime Text 3 Build 3103 License Key - CRACK
Created Jul 6, 2016
Sublime Text 3 Build 3103 License Key - CRACK
View Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
View create-ruby-gem.md

Como criar uma gem ruby?

Escolhi tratar sobre esse assunto hoje simplesmente porque foi uma das primeiras coisas que me perguntei "como eu faço isso?" no mundo ruby. Acredito que muita gente se pergunte a mesma coisa e espero que eu possa ajudar em algo para elas. 😀

O que é uma gem?

Bem, se você é um programador java, você chama sua gem de jar, se você é um programador C#, você chama de dll. Resumindo, é uma lib, uma biblioteca contendo códigos que você pode reaproveitar importando em outros projetos.

E usar gems no ruby é muito fácil, se você já deu uma brincada com rails por exemplo, é só você adicionar o código gem 'nome_da_gem' no arquivo Gemfile que está no root, depois executar o comando bundle install para baixar sua gem do repositório e pronto, só sair usando a biblioteca!

View install-bs3-snippet-sublime.sh
#!/bin/bash
# Description: Install Bootstrap 3 - Sublime Plugin [Snippets] in Linux.
# OS: Linux
# By script: William C. Canin
# License: MIT
#
# Variables default
sublime_version="3"
@williamcanin
williamcanin / install_sublime_text.sh
Last active Dec 6, 2015 — forked from simonewebdesign/install_sublime_text.sh
Install Sublime Text 3 on Linux via POSIX shell script
View install_sublime_text.sh
#!/usr/bin/env bash
# Sublime Text 3 install with Package Control via POSIX shell script (last update: 12 July 2015)
# No need to download this script, just run it on your terminal:
#
# When you need to update Sublime Text, run this script again.
VERSION="3"
@williamcanin
williamcanin / catch_ip
Last active Nov 22, 2015
IP capture and public IP. (Script Shell) Linux terminal
View catch_ip
#!/bin/bash
#
# Description: Simple script (shell) for view your IP and IP Public.
# By: William Canin <williamcanin.com> {william.costa.canin@gmail.com}
#
# Package dependencies:
# > net-tools
# > lynx
# Network interface card. Example: eth0, eth1, enp19s0, wlan0, wlan1, wlp7s0,... etc.
@williamcanin
williamcanin / convert_video
Created Nov 22, 2015
Script shell (Linux) convert video. Dependencies: Mencoder.
View convert_video
#!/bin/bash
# Video
INPUT="input.mkv"
OUTPUT="output.mp4"
# Codecs
VIDEO="x264"
AUDIO="mp3lame"
@williamcanin
williamcanin / sleep_monitor
Created Nov 22, 2015
Command terminal - Sleep Monitor Linux
View sleep_monitor
#!/bin/bash
case "$1" in
off )
xset -display :0.0 dpms force on
;;
on )
xset -display :0.0 dpms force off
;;
* )
View modbl_installer
#!/bin/bash
# Usage: curl -sL git.io/vcsE8 | bash
#
DIR_MODBL_EXEC="/usr/bin"
MODBL_FILE="modbl"
function _CORRECTING(){
# Enable EOF
sed -i "s/%EOF/EOF/g" $DIR_MODBL_EXEC/$MODBL_FILE
You can’t perform that action at this time.