#Get Gravatar image using command line(Mac OS X only)
Gravatar image download url
http://www.gravatar.com/avatar/HASH
Get default image
curl -o yourname.png http://www.gravatar.com/avatar/$(md5 -q -s [email protected])
| import sqlite3 | |
| # open connection and get a cursor | |
| conn = sqlite3.connect(':memory:') | |
| c = conn.cursor() | |
| # create schema for a new table | |
| c.execute('CREATE TABLE IF NOT EXISTS sometable (name, age INTEGER)') | |
| conn.commit() |
| #!/usr/bin/env python | |
| # September 2013 | |
| # by Matthew Bordignon, @bordignon on Twitter | |
| # | |
| # Simple Python script (v2.7x) that subscribes to a MQTT broker topic and inserts the topic into a mysql database | |
| # This is designed for the http://mqttitude.org/ project backend | |
| # | |
| import MySQLdb | |
| import mosquitto |
| /* | |
| TITLE: CODE GRABBER FOR HT6P20B ENCODER | |
| CREATED BY: AFONSO CELSO TURCATO | |
| DATE: 14/JAN/2014 | |
| E-MAIL: acturcato (at) gmail.com | |
| LICENSE: GPL | |
| REV.: 00 | |
| DESCRIÇÃO: | |
| http://acturcato.wordpress.com/2014/01/14/clonagem-de-controle-remoto-rf-learning-code-ht6p20b-com-arduino/ |
#Get Gravatar image using command line(Mac OS X only)
Gravatar image download url
http://www.gravatar.com/avatar/HASH
Get default image
curl -o yourname.png http://www.gravatar.com/avatar/$(md5 -q -s [email protected])
| // Enviando e-mails usando o Node.js e o famoso nodemailer | |
| var nodemailer = require('nodemailer'); | |
| // Vamos criar a conta que irá mandar os e-mails | |
| var conta = nodemailer.createTransport({ | |
| service: 'Gmail', // Existem outros services, você pode procurar | |
| // na documentação do nodemailer como utilizar | |
| // os outros serviços | |
| auth: { | |
| user: '[email protected]', // Seu usuário no Gmail |
| #!/bin/bash | |
| # CHANGE THESE | |
| auth_email="[email protected]" | |
| auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings | |
| zone_name="example.com" | |
| record_name="www.example.com" | |
| # MAYBE CHANGE THESE | |
| ip=$(curl -s http://ipv4.icanhazip.com) |
| Salva isso como mp3 | |
| http://www.receita.fazenda.gov.br/pessoajuridica/cnpj/cnpjreva/captcha/gerarSom.asp | |
| Converte pra flac | |
| http://stackoverflow.com/questions/18266785/sox-for-converting-flac-file-to-320-bit-mp3 | |
| sox input.mp3 output.flac | |
| Envia para google speech e recebe um json | |
| require 'json' | |
| require 'net/http' |
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
| import sys | |
| def count_words(text_file): | |
| file = open(textfile,'r+') | |
| word_list = {} | |
| for word in file.read().split(): | |
| if word not in word_list: | |
| word_list[word] = 1 | |
| else: |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Wed Apr 5 15:50:49 2017 | |
| @author: andre | |
| """ | |
| import json | |
| from bs4 import BeautifulSoup |