Skip to content

Instantly share code, notes, and snippets.

View luiseduardobrito's full-sized avatar

Luis Eduardo Brito luiseduardobrito

  • São Paulo, Brazil
View GitHub Profile
<html>
<head>
<title>LYWSD02 Clock sync</title>
<meta name="viewport" content="width=480">
</head>
<body >
<h1>LYWSD02 Clock sync </h1>
<h2>Xiaomi Mijia BT4.0 Wireless Smart Electric Digital Clock Indoor & Outdoor Hygrometer Thermometer</h2>
console.log("Remote test");
@luiseduardobrito
luiseduardobrito / keybase.md
Created September 15, 2019 19:33
keybase.md

Keybase proof

I hereby claim:

  • I am luiseduardobrito on github.
  • I am luisbrito (https://keybase.io/luisbrito) on keybase.
  • I have a public key ASABXU7ouSYYD8adNLWeW6Qpnft6sWRAeusktk4Zn5kXAwo

To claim this, I am signing this object:

import { User, UserRole, UserStatus } from "bitcapital-core-sdk";
import * as React from "react";
import { Button, Col, Form, FormGroup, Input, Label } from "reactstrap";
import FormContainer from "../container/FormContainer";
export interface UserFormProps {
user: User;
readonly: boolean;
handleChange: (id: string, value: any) => void;
handleSubmit: () => void;
@luiseduardobrito
luiseduardobrito / accounts.js
Last active June 19, 2017 15:09 — forked from mackbrowne/gist:30317eba75d13683566ead357b52bbce
Accounts Meteor Hack for Linking social accounts (Facebook, Twitter, etc)
Accounts.onCreateUser((options, user) => {
user.city = null;
user.networks = [];
user.attending = [];
if (user.profile == null) {
user.profile = {};
}
if (user.services != null) {
var service = _.keys(user.services)[0];
#!/bin/sh
dig +short txt ${1}.wp.dg.cx
#!/bin/bash
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1024
sudo mkswap /swapfile
# NOTE: This swap memory will not be there when you reboot your pc.
# To retain it, you can make a entry in /etc/fstab file or again
# run the commands from 3rd.
@luiseduardobrito
luiseduardobrito / download_site
Created August 13, 2013 18:59
Download whole site using wget
wget --random-wait -r -p -e robots=off -U mozilla http://www.example.com
@luiseduardobrito
luiseduardobrito / ec2_deps.sh
Created August 2, 2013 18:06
Script for preparing an EC2 instance in first boot for a Node.js v0.10.15 environment.
#!/bin/bash
sudo apt-get update
sudo apt-get install make
sudo apt-get install mongodb
wget http://nodejs.org/dist/v0.10.15/node-v0.10.15.tar.gz
tar -xvzf node-v0.10.15.tar.gz
cd node-v0.10.15
@luiseduardobrito
luiseduardobrito / email.py
Last active December 17, 2015 17:28
Python script for cleaning a csv based on a ban list. (Used to clean big email lists)
import csv, sys, random
# num = qtd de emails a escolher
num = 40000
csv_file = "lista.csv"
out_file = "output.csv"
email_list = list(csv.reader(open(csv_file, 'r')))