Skip to content

Instantly share code, notes, and snippets.

1. Configurar IPv4 estático e IPv6 estático no pihole (YMMV)
192.168.1.2 e 2001:818:xxxx::192:168:1:2 no meu caso
2. Configurar DNS uplink do pihole igual ao IP do Router (192.168.1.1)
3. Configurar Router
Huawei HS8247W (Smart Router 2)
1. Configurações Avançadas -> LAN -> Configuração de DHCP
Servidor DNS Primário: 192.168.1.2
@pwnall
pwnall / yunmai_protocol.txt
Created January 29, 2017 11:38
Yunmai smart scale (M1301, M1302, M1303) Bluetooth LE protocol notes
Yunmai smart scale (M1301, M1302, M1303) Bluetooth LE protocol notes
Commands are written to GATT attribute 0xffe9 of service 0xffe5. Responses come
as value change notifications for GATT attribute 0xffe4 of service 0xffe0. These
are 16-bit Bluetooth LE UUIDs, so nnnn is 0000nnnn-0000-1000-8000-00805F9B34FB.
-----
Packet Structure
@augustoproiete
augustoproiete / teamcity-metarunner-to-use-special-version-for-nuget.xml
Last active March 24, 2021 01:21
Example of a TeamCity meta-runner that updates the build.version variable and provides other variants of version variables, such as a special version for NuGet
<?xml version="1.0" encoding="UTF-8"?>
<meta-runner name="Meta (CaioProiete): Initialize build and set custom parameters">
<description>Initialize the build and set the value of some custom parameters that can be used during the build, such as version, timestamp, and others</description>
<settings>
<parameters>
<param name="mr.initialize_build.releaseBranch" value="%build.releaseBranch%" spec="text label='Release Branch:' description='The name of the branch from where production releases are generated' display='normal' validationMode='not_empty'" />
<param name="mr.initialize_build.verbose" value="SilentlyContinue" spec="checkbox checkedValue='Continue' description='Log verbose messages?' display='normal' label='Verbose:' uncheckedValue='SilentlyContinue'" />
</parameters>
<build-runners>
<runner name="Initialize build and set custom parameters" type="jetbrains_powershell">
@pgte
pgte / auth.md
Last active December 31, 2015 14:49

I built this service rendered over HTTPS.

We're using the Hawk protocol to authenticate message producers, but since the service will use HTTPS, Hawk is an overkill in my opinion.

Some of the drawbacks of using Hawk in my opinion:

  1. Signs whole message: overkill when you're using TLS
  2. Tries to be stateless on the server-side and implements a sort of message non-repeatability by including a timestamp inside the message. The timestamp has to be equal to the server-side time take or give 1 minute. This imposes time synchronizatin between client and server, which is hard to enforce.
@jagregory
jagregory / Restish.cs
Created May 4, 2011 13:51
Watch out NancyFX!
public class Api : Restish
{
Api()
{
Get("/customers", (req, res) =>
{
return View(new[]
{
new { name = "Charles" }
});