This is not intended to be comprehensive or authoritative, just free online resources I've found valuable while learning more about Erlang.
https://web.archive.org/web/20070429181654/http://www.sics.se/~joe/
| //============================================================================ | |
| // Name : OctaneCrawler.cpp | |
| // Author : Berlin Brown (berlin dot brown at gmail.com) | |
| // Version : | |
| // Copyright : Copyright Berlin Brown 2012-2013 | |
| // License : BSD | |
| // Description : This is the simplest possible web crawler in C++ | |
| // Uses boost_regex and boost_algorithm | |
| //============================================================================ |
This is not intended to be comprehensive or authoritative, just free online resources I've found valuable while learning more about Erlang.
https://web.archive.org/web/20070429181654/http://www.sics.se/~joe/
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| ## -*- coding: utf-8 -*- | |
| import os | |
| import time | |
| import datetime | |
| import logging | |
| import logging.handlers | |
| class Logger(object) : | |
| #inner class for logs | |
| class __Logger: |
| const repl = require('repl'); | |
| const babel = require('babel-core'); | |
| function preprocess(input) { | |
| const awaitMatcher = /^(?:\s*(?:(?:let|var|const)\s)?\s*([^=]+)=\s*|^\s*)(await\s[\s\S]*)/; | |
| const asyncWrapper = (code, binder) => { | |
| let assign = binder ? `global.${binder} = ` : ''; | |
| return `(function(){ async function _wrap() { return ${assign}${code} } return _wrap();})()`; | |
| }; |
| //npm i nodemailer --save | |
| var nodemailer = require('nodemailer'); | |
| function sendEmail(subject, emailBody, email){ | |
| let myEmail = 'myEmailAddress'; | |
| let transporter = nodemailer.createTransport({ | |
| service: 'Hotmail', //Gmail, Hotmail | |
| auth: { |
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func separar(nums []int, i, p chan<- int, pronto chan<- bool) { | |
| for _, n := range nums { | |
| if n%2 == 0 { | |
| p <- n |
| #Exibir processos de uma porta | |
| PORT=3000 | |
| lsof -i:$PORT | |
| #Matar todos os processos de uma porta | |
| kill -9 $(lsof -t -i:$PORT -sTCP:LISTEN) |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "syscall" | |
| ) | |
| // docker run <container> cmd args |
| aws ec2 create-security-group --group-name jenkins-group --description "security group for CI in EC2" | |
| # sg-2452a250 | |
| MY_IP=$(curl ipinfo.io/ip) | |
| aws ec2 authorize-security-group-ingress --group-name jenkins-group \ | |
| --protocol tcp --port 8080 --cidr $MY_IP/32 \ | |
| aws ec2 authorize-security-group-ingress --group-name jenkins-group \ | |
| --protocol tcp --port 22 --cidr $MY_IP/32 |