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 / numberFormatHelper.js
Last active September 19, 2023 18:51
numberFormat Handlebars helper
/**
* An Handlebars helper to format numbers
*
* This helper have these three optional parameters:
* @var decimalLength int The length of the decimals
* @var thousandsSep char The thousands separator
* @var decimalSep char The decimals separator
*
* Based on:
* - mu is too short: http://stackoverflow.com/a/14493552/369867
# /etc/security/limits.conf
#<domain> <type> <item> <value>
* - nofile 100000
* - nproc 104448
root - nofile 100000
# End of file
#!/bin/sh -e
#/etc/rc.local
echo "1024" > /proc/sys/net/core/somaxconn
echo "1" > /proc/sys/net/ipv4/tcp_syncookies
echo "4096 87380 16777216" > /proc/sys/net/ipv4/tcp_rmem
echo "4096 65536 16777216" > /proc/sys/net/ipv4/tcp_wmem
echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes
echo "15" > /proc/sys/net/ipv4/tcp_keepalive_intvl
#!/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
#!/usr/bin/php
<?php
date_default_timezone_set('America/Sao_Paulo');
/**
* Script responsible to handle communication with Akamai
*
* @author Danniel Magno
* @version 1.0
*/
@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"

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

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:

@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
@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