Skip to content

Instantly share code, notes, and snippets.

View viannaandreBR's full-sized avatar
🏠
Working from Office

Andre viannaandreBR

🏠
Working from Office
View GitHub Profile
@ramalho
ramalho / relogio.py
Last active April 17, 2022 22:21
Um relógio bem simples feito em Python com Tkinter. Vídeo de demonstração: http://www.youtube.com/watch?v=xCiPshN9nOs
#!/usr/bin/env python3
import tkinter
from time import strftime
def tic():
rel['text'] = strftime('%H:%M:%S')
def tac():
tic()
rel.after(1000, tac)
@leocomelli
leocomelli / git.md
Last active November 18, 2024 19:43
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@ThomasG77
ThomasG77 / countries.geojson
Last active January 4, 2024 19:54
Sample Leaflet with GeoJSON
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Github Two-Factor Authentication (2FA) for Brazil via SMS

The Github doesn't provide country code for Brazil (+55). To add this option, just run the code below in your console. The option Brazil +55 will be the first on the list, already selected:


🇧🇷 [pt-BR]

Autenticação em dois fatores (2FA) do GitHub para o Brasil via SMS

@harlantwood
harlantwood / ipfs-add-file.js
Last active July 18, 2021 08:09
Upload a binary file to IPFS via React.
// This is DEPRECATED, see a full running example here instead:
// https://github.com/ipfs/js-ipfs-api/tree/97f6ed27d72b189c02865cb0fdd4f58fafd89625/examples/upload-file-via-browser
import React from 'react'
import IpfsApi from 'ipfs-api'
const Buffer = require('buffer/').Buffer
export default class AddMedia extends React.Component {
constructor {
@GhazanfarMir
GhazanfarMir / clear-images.sh
Last active October 23, 2024 05:56
Single shell script to remove all containers, images and volumes used by containers. The script first tries to stop containers if there is any running, then remove the containers, followed by images removal and finally the container volumes.
#!/bin/bash
###########################################
#
# Simple Shell script to clean/remove all container/images
#
# The script will
# - first stop all running containers (if any),
# - remove containers
# - remove images
# - remove volumes
@eCoinomic
eCoinomic / general.sol
Last active August 2, 2020 05:42
general.sol
pragma solidity >=0.4.22 <0.6.0;
// Current version:0.5.3+commit.10d17f24.Emscripten.clang
// Optinization: YES
contract owned {
address public owner;
constructor() public {
owner = msg.sender;
@diego3g
diego3g / NODE.md
Last active November 18, 2024 19:18
VSCode Settings (Updated)

⚠️ Note!

With VSCode version 1.94, the APC extension broke and there is no fix yet.

So, for those having issues with APC after the VSCode update, I recommend downloading the previous version of VSCode for now (https://code.visualstudio.com/updates/v1_93) and setting updates to manual by adding this to the editor's configuration:

"update.mode": "manual",
[alias]
ci = commit
co = checkout
cm = checkout master
cb = checkout -b
st = status -sb
sf = show --name-only
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)