Skip to content

Instantly share code, notes, and snippets.

View DennyLoko's full-sized avatar
🌟
GitHub Gold Member

Danniel Magno DennyLoko

🌟
GitHub Gold Member
View GitHub Profile
@DennyLoko
DennyLoko / index.js
Created December 8, 2021 19:32
AWS SNS automatic topic subscription accepter
const express = require('express')
const request = require('request')
const bodyParser = require('body-parser')
const app = express()
const port = process.env.PORT
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())
@DennyLoko
DennyLoko / pogovision_areas.js
Last active August 9, 2017 13:11
Áreas do PogoVision
var areas = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Name":"#mg_bh_barreiro"},"geometry":{"type":"Polygon","coordinates":[[[-44.00614757282236,-19.95520180429213],[-44.00628218543212,-19.95517229431444],[-44.00635903346772,-19.95515637311685],[-44.00641274895099,-19.95514763986715],[-44.00651447278684,-19.95513556170971],[-44.00659700492775,-19.95513051287263],[-44.00667945679085,-19.95513829165888],[-44.00675013043528,-19.95515205721261],[-44.00686715471843,-19.95515036307723],[-44.00700544895295,-19.95514951054416],[-44.00721461402854,-19.95515610065901],[-44.00736910403056,-19.95517367719091],[-44.00752347574034,-19.95519757664618],[-44.00766483061535,-19.95522393269852],[-44.00786395457513,-19.95526118113073],[-44.00803492160375,-19.95529005118494],[-44.00821123972339,-19.95533268247427],[-44.00867984844057,-19.95540811284284],[-44.00888171042394,-19.95544862763712],[-44.00918791317056,-19.95546180985582],[-44.00946722870222,-19.95545252783466],[-44.0096104880201,-19.955438
@DennyLoko
DennyLoko / cloud-config
Created February 16, 2017 18:45
My CoreOS cloud-config
#cloud-config
coreos:
units:
- name: docker.service
command: start
- name: install-docker-compose.service
command: start
content: |
[Unit]
@DennyLoko
DennyLoko / docker-compose.yaml
Created January 26, 2017 16:18
TICK stack config
version: "2"
services:
telegraf:
container_name: telegraf
image: mjenz/rpi-telegraf:alpine
restart: always
network_mode: host
pid: host
depends_on:
- influxdb
@DennyLoko
DennyLoko / input.go
Created January 19, 2017 17:21
go-generics test
package main
import (
"fmt"
)
type F generics
func cornuz(a, b, c, d, e F) F {
return a

Keybase proof

I hereby claim:

  • I am dennyloko on github.
  • I am dennyloko (https://keybase.io/dennyloko) on keybase.
  • I have a public key ASAEesctQdzSJcw0F_lrUfv07_htb1iVf5pOfLQmPLimtwo

To claim this, I am signing this object:

Configuração do vulcand para os bot's

ATENÇÃO! Preste atenção aos id's em cada etapa para não fazer merda!

Configuração

Passos

  1. Criar backend
  2. Criar frontend
  3. Criar servidores
  4. Configurar rewrites
@DennyLoko
DennyLoko / httpinspect.go
Last active August 7, 2017 00:01
This simple application is made to inspect the request sent to other webservers
package main
// This simple application is made to inspect the request sent to other
// webservers. Simply edit your hosts file and point the address to your IP.
// You must be root to use port 80.
// Don't forget to: go get -u github.com/valyala/fasthttp
import (
"flag"
"fmt"
#!/usr/bin/php
<?php
date_default_timezone_set('America/Sao_Paulo');
/**
* Script responsible to handle communication with Akamai
*
* @author Danniel Magno
* @version 1.0
*/
#!/usr/bin/python
#
# Show current CPU temperature
#
import os
import json
cpu_temp = float(os.popen('cat /sys/class/thermal/thermal_zone0/temp').read()) / 1000