Skip to content

Instantly share code, notes, and snippets.

View mayeaux's full-sized avatar
💭
Coding

Anthony mayeaux

💭
Coding
View GitHub Profile
After searching for more than 6 hours trying to understand what is zoho's mail problem to send emails!
After i red lots lots of there answer with no helpul solution i found the issue was that you need to have the ``` sender ``` option
in your nodemailer option same like email with same sender name and sender email. like this : ``` from: '"senderNameSameLikeTheZohoOne" <emailname@yourwebsite.com>',```
my config :
```
const transporter = nodemailer.createTransport({
service:'Zoho',
host: 'smtp.zoho.com',
port: 465,
@mayeaux
mayeaux / web3-solc-contract-compile-deploy.js
Created September 8, 2019 00:50 — forked from tomconte/web3-solc-contract-compile-deploy.js
Compiling and deploying an Ethereum Smart Contract, using solc and web3.
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
// Connect to local Ethereum node
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
// Compile the source code
const input = fs.readFileSync('Token.sol');
const output = solc.compile(input.toString(), 1);
@mayeaux
mayeaux / send.py
Created August 31, 2019 03:45 — forked from ivandru/send.py
Simple Ether Transfer on Ropsten
import web3
import json
from eth_account import Account
from web3 import Web3
w3 = Web3(Web3.HTTPProvider('https://ropsten.infura.io/v3/apiKey'))
acct = Account.privateKeyToAccount('private key')
nonce = w3.eth.getTransactionCount(acct.address)
transaction = {
'to' : toAccount,
'value': 1,
@mayeaux
mayeaux / sendRawTransaction.js
Created August 31, 2019 02:54 — forked from raineorshine/sendRawTransaction.js
Sends a raw transaction with web3 v1.0, ethereumjs-tx v2.1.0, and Infura
const Web3 = require('web3')
const Tx = require('ethereumjs-tx').Transaction
// connect to Infura node
const web3 = new Web3(new Web3.providers.HttpProvider('https://mainnet.infura.io/INFURA_KEY'))
// the address that will send the test transaction
const addressFrom = '0x1889EF49cDBaad420EB4D6f04066CA4093088Bbd'
const privKey = 'PRIVATE_KEY'
const fs = require("fs");
const solc = require('solc')
let Web3 = require('web3');
let web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
var input = {
'strings.sol': fs.readFileSync('strings.sol', 'utf8'),
'StringLib.sol': fs.readFileSync('StringLib.sol', 'utf8'),
@mayeaux
mayeaux / youtube api video category id list
Created July 17, 2019 20:56 — forked from dgp/youtube api video category id list
youtube api video category id list
2 - Autos & Vehicles
1 - Film & Animation
10 - Music
15 - Pets & Animals
17 - Sports
18 - Short Movies
19 - Travel & Events
20 - Gaming
21 - Videoblogging
22 - People & Blogs
@mayeaux
mayeaux / buzzfeed_api.md
Created July 16, 2019 18:47
BuzzFeed API - hackNY hackathon
                                               .--.
                                               `.  \
                                                 \  \
                                                  .  \
                                                  :   .
                                                  |    .
                                                  |    :
                                                  |    |
  ..._  ___                                       |    |
 `."".`''''""--..___ | |
@mayeaux
mayeaux / twitter-poll-result.js
Created June 24, 2019 03:51 — forked from vicke4/twitter-poll-result.js
Bookmarklet to view Twitter poll result without voting
(
function() {
var pod = document.getElementById('permalink-overlay-dialog');
if (!pod) return alert('Not a valid poll');
var iframeList = pod.getElementsByTagName('iframe');
if (iframeList.length === 0) return alert('Not a valid poll');
else if (iframeList.length > 1) return alert('Not a valid poll');
@mayeaux
mayeaux / webrtc-options.md
Created December 12, 2017 01:02 — forked from jpopesculian/webrtc-options.md
Large Scale WebRTC Broadcast

Large Scale WebRTC Broadcast

The Problem

WebRTC is a protocol that has been standardized in recent years among major browsers like Chrome, Firefox, Opera and the Android Browsers. Plugins/Native Implementations are available on IE/Edge/Safari and iOS/Android basically providing a relatively global protocol for real time media streams. However WebRTC is a P2P protocol which means that if a user wishes to broadcast his/her video to multiple users he/she needs to individually send that broadcast to each participant. This works on a small scale, but degrades quickly on a large scale due to bandwidth deterioration.

The Solution

One possible solution is to let the user stream his/her media to a server and the server in turn splits the media streams to the subscribers. There are two technical ways to do this. A Selective Forwarding Unit (SFU) which simply forwards streams, and a Multipoint Control Unit (MCU) which essentially does the same thing but lowers bandwidth usage by packaging streams together.

@mayeaux
mayeaux / setup-vagrant-macosx.md
Created May 20, 2018 22:10 — forked from tomysmile/setup-vagrant-macosx.md
How to Install Virtualbox and Vagrant on MacOSX

Install Virtualbox && Vagrant for MacOSX

Vagrant uses Virtualbox to manage the virtual dependencies. You can directly download virtualbox and install or use homebrew for it.

$ brew cask install virtualbox

Now install Vagrant either from the website or use homebrew for installing it.