This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# MY custom config for openwrt with nanopi r4s | |
# Automatically generated file; DO NOT EDIT. | |
# OpenWrt Configuration | |
# | |
CONFIG_MODULES=y | |
CONFIG_HAVE_DOT_CONFIG=y | |
CONFIG_HOST_OS_LINUX=y | |
# CONFIG_HOST_OS_MACOS is not set | |
# CONFIG_TARGET_sunxi is not set |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#script para testar conectividade com internet, caso não tenha internet reinicia o sistema | |
tempo_timeout=3 | |
tempo_espera_entre_ping=3 | |
ip_avaliacao=8.8.8.200 | |
while : | |
do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// update date and time of a onvif cam | |
const onvif = require('onvif'); | |
const Cam = onvif.Cam; | |
onvif.Discovery.on('device', (cam) => { | |
new Cam(cam, function (err) { | |
if (err) { | |
console.error('Connection Failed for ', err); | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo '<pre>'; | |
var_dump(getallheaders()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# O que fazer para melhorar a eficiência energética? | |
# projeto: https://ibb.co/D9sMqyf | |
#include <NTPClient.h> | |
#include <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
#include <Arduino.h> | |
#include <TM1637Display.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "app.hpp" | |
#include "include/mapbox/earcut.hpp" | |
#include "include/delfrrr/delaunator.hpp" | |
#include "engine/text/Glyph.hpp" | |
GLenum glCheckError_(const char *file, int line) | |
{ | |
GLenum errorCode; | |
while ((errorCode = glGetError()) != GL_NO_ERROR) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "app.hpp" | |
#include "include/mapbox/earcut.hpp" | |
#define BEZIER_STEP 0.01f | |
void framebuffer_size_callback(GLFWwindow* window, int width, int height); | |
void processInput(GLFWwindow *window); | |
// settings | |
const unsigned int SCR_WIDTH = 800; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Point = std::array<float, 2>; | |
int main() | |
{ | |
Point a = {1.1f, 2.1f}; | |
Point b = {1.5f, 2.5f}; | |
Point c = {5.5f, 3.5f}; | |
Point d = {4.5f, 1.5f}; | |
std::vector<Point> polygon; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
export PATH=$PATH:/home/paulocanedo/apps/jdk-8u201-linux-x64/jdk1.8.0_201/bin | |
export PATH=$PATH:/home/paulocanedo/apps/gradle-5.1.1-bin/gradle-5.1.1/bin | |
export JAVA_HOME=/home/paulocanedo/apps/jdk-8u201-linux-x64/jdk1.8.0_201 | |
export ANDROID_HOME=/home/paulocanedo/Android/Sdk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function calcularDigitoVerificador(numero) { | |
const mod11 = (value) => `${value}` | |
.split('') | |
.map(elem => Number.parseInt(elem)) | |
.reduce((sum, elem, index) => sum + elem * (index + 1)) % 11; | |
let dv1 = mod11(numero.substring(0, 9)); | |
dv1 = dv1 >= 10 ? 0 : dv1; | |
let dv2 = mod11(`${numero.substring(1, 9)}${dv1}`) | |
dv2 = dv2 >= 10 ? 0 : dv2; |
NewerOlder