Skip to content

Instantly share code, notes, and snippets.

View jonasmalacofilho's full-sized avatar

Jonas Malaco jonasmalacofilho

View GitHub Profile
@jonasmalacofilho
jonasmalacofilho / speedtest_data.tsv
Created July 14, 2015 12:24
Vivo Fibra 200M speed log
We can't make this file beautiful and searchable because it's too large.
2014-12-17T14:22:06.562784 eth0 192.168.1.1 70:62:b8:25:6c:40 8.742 39671183.9133 11016456.4789 3971 http://www.speedtest.net/result/3992112917.png
2014-12-17T14:30:01.345693 eth0 192.168.1.1 70:62:b8:25:6c:40 12.08 42996923.9504 4892259.7027 4003 http://www.speedtest.net/result/3992132536.png
2014-12-17T14:40:01.807608 eth0 192.168.1.1 70:62:b8:25:6c:40 11.285 9797460.53802 5468312.74004 4003 http://www.speedtest.net/result/3992158163.png
2014-12-17T14:50:01.495551 eth0 192.168.1.1 70:62:b8:25:6c:40 8.742 43025701.9719 10473018.778 3971 http://www.speedtest.net/result/3992183070.png
2014-12-17T15:00:01.396479 eth0 192.168.1.1 70:62:b8:25:6c:40 8.345 42726284.1329 15028599.6054 4978 http://www.speedtest.net/result/3992208744.png
2014-12-17T15:10:01.990281 eth0 192.168.1.1 70:62:b8:25:6c:40 8.742 36634410.4463 10716613.0554 3971 http://www.speedtest.net/result/3992234613.png
2014-12-17T15:20:01.885111 eth0 192.168.1.1 70:62:b8:25:6c:40 8.663 14638218.0691 5922438.3267 4003 http://www.speedtest.net/result/39922
@jonasmalacofilho
jonasmalacofilho / root-sync-before-sleep.service
Last active October 16, 2022 12:11
Systemd service file for running `sync` before trying to suspend/hibernate/hybrid-sleep
[Unit]
Description=Sync before trying to suspend/hibernate/hybrid-sleep
Before=sleep.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/sync
@jonasmalacofilho
jonasmalacofilho / git-cheat-sheet.md
Last active August 28, 2015 04:36
Git cheat-sheet para o Frá

Um cheat-sheet do Git para o Frá

O básico

Vamos supor que eu criei um arquivo example_file.

O primeiro passo é ver o estado do repositório com git status:

$ git status
@jonasmalacofilho
jonasmalacofilho / activate.sh
Created October 16, 2016 12:31 — forked from Andrei-Pozolotin/activate.sh
ubuntu 14.04 cryptsetup luks suspend/resume root partition
#!/bin/bash
#
# ubuntu 14.04 cryptsetup luks suspend/resume root partition sleep activation
#
source=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # install script folder
target=/run/pm-crypto # chroot environment folder
bind_list="/dev /proc /sys /run" # special system mounts
@jonasmalacofilho
jonasmalacofilho / IntDict.hx
Last active July 17, 2017 16:48
Haxe-written IntHash code inspired by Python tables (aka artifact 887b53126e237d6c68951111d594033403889304)
package jonas.ds;
import haxe.Timer;
import jonas.RevIntIterator;
// imports for testing
import haxe.Log;
import jonas.unit.TestCase;
import jonas.unit.TestRunner;
@jonasmalacofilho
jonasmalacofilho / NZXT Kraken X62: USB protocol.md
Last active December 22, 2024 10:51
NZXT Kraken X62: USB protocol

The NZXT Kraken X62

USB analysis and revised protocol for devices with firmware v4.0.2

@jonasmalacofilho
jonasmalacofilho / NZXT Smart Device: USB protocol.md
Last active September 7, 2018 02:57
NZXT Smart Device: USB protocol

The NZXT Smart Device

Mostly just data, all conclusions are only documented in the form of code: liquidctl.

vid=1e71
pid=1714
rev=0200

How the NZXT Hue+ works

Also applies to the NZXT Smart Device

TL; DR

Hue+ accessories use WS2812B integrated LED and controllers. Pinout is:

  • +5V (marked with arrow; corresponding wire with white stripe)
  • IN (data in)
# Spark L v1.2.1 (AVX -3, opt. memory, 1.380 V @ LLC4 & 300 kHz)
# Standard VRM power phase control not fully stress tested, though it passed serveral loading and unloading cycles
# Board settings
Tuner: XMP DDR4-3333, but don't optimize
MCE: disable
BLCK: 100 Hz
# CPU settings
Core ratio: 50 # yay, 5 GHz : )

Adding support for second generation Krakens to liquidctl

NZXT Kraken X31, X41 and X61

Feature request: issue #3
Development: pull request #7

Work in progress:

  • initialization