Skip to content

Instantly share code, notes, and snippets.

View iamgoangle's full-sized avatar
:octocat:
Focusing

Teerapong Singthong iamgoangle

:octocat:
Focusing
View GitHub Profile
package main
import (
"log"
"github.com/iamgoangle/rabbit-go/internal/rabbitmq"
)
func main() {
conn, err := rabbitmq.NewConnection(rabbitmq.ConfigConnection{
package main
import (
"log"
"github.com/iamgoangle/rabbit-go/internal/rabbitmq"
)
func main() {
conn, err := rabbitmq.NewConnection(rabbitmq.ConfigConnection{
@iamgoangle
iamgoangle / docker-compose.yml
Created June 29, 2019 06:47
RabbitMQ expose admin dashboard and AMQP
version: '3'
services:
rabbitmq:
image: bitnami/rabbitmq:latest
environment:
- RABBITMQ_NODE_PORT_NUMBER=5672
- RABBITMQ_DEFAULT_VHOST=/
- RABBITMQ_USERNAME=admin
- RABBITMQ_PASSWORD=1234
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <BlynkSimpleEsp8266.h>
#include <dht11.h>
// WiFi
//const char *ssid = "<your_ssid>";
//const char *password = "<your_password>";
char networkDriver = 'b'; // 'n' = normal 'b' = blynk
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <BlynkSimpleEsp8266.h>
#include <dht11.h>
// WiFi
//const char *ssid = "<your_ssid>";
//const char *password = "<your_password>";
char networkDriver = 'b'; // 'n' = normal 'b' = blynk
/**
* @project Controle LED via WiFi with Blynk
* @author Teerapong Singthong <st.teerapong@gmail.com>
* @desc medium.com/iamgoangle
*/
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
/*
This sketch demonstrates how to scan WiFi networks.
The API is almost the same as with the WiFi Shield library,
the most obvious difference being the different file you need to include:
*/
#include "ESP8266WiFi.h"
void setup()
{
Serial.begin(115200);
#include <ESP8266WiFi.h>
void setup(){
Serial.begin(115200);
}
void loop(){
Serial.println();
Serial.print("MAC: ");
Serial.println(WiFi.macAddress());
@iamgoangle
iamgoangle / main.go
Created May 28, 2019 18:29
Locality of reference
package main
import (
"fmt"
"time"
)
func A() {
start := time.Now()