Skip to content

Instantly share code, notes, and snippets.

View cleverfox's full-sized avatar
🎯
Focusing

Vladimir Goncharov cleverfox

🎯
Focusing
  • Pattaya, Thailand
  • 02:15 (UTC +07:00)
View GitHub Profile
@aras-p
aras-p / preprocessor_fun.h
Last active November 15, 2024 09:22
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
/*\从PAWN虚拟机原码中提取的 KeeLoq 算法:
* Corrected KeeLoq Encryption and Decryption functions by Ruptor.
* Use at your own risk! This source is not copyrighted.
* Encoder encrypts an all-0 block, decoder decrypts it.
* KeeLoq cipher encrypts 32-bit blocks with 64-bit keys.
* Key is XORed with a 32-bit IV incremented on each use.
* See http://www.keeloq.boom.ru/decryption.pdf for more details.
* KeeLoq algorithm itself is not patented.
\*/
#include "amx.h"
@stolen
stolen / timetop.erl
Created January 18, 2018 16:08
top processes by scheduled time
-module(timetop).
-export([top/2]).
top(Duration, Count) ->
OldPrio = erlang:process_flag(priority, high),
Result = scheduled_time_top(Duration),
erlang:process_flag(priority, OldPrio),
lists:sublist(Result, Count).
@cliffrowley
cliffrowley / STREAMDECK_HID.md
Last active August 9, 2024 09:01
Notes on the Stream Deck HID protocol

Stream Deck Protocol

How to interface with a Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

@uXeBoy
uXeBoy / minimalDVID_encoder.v
Last active October 9, 2022 03:18
minimalDVID_encoder.v
`default_nettype none // disable implicit definitions by Verilog
//-----------------------------------------------------------------
// minimalDVID_encoder.vhd : A quick and dirty DVI-D implementation
//
// Author: Mike Field <[email protected]>
//
// DVI-D uses TMDS as the 'on the wire' protocol, where each 8-bit
// value is mapped to one or two 10-bit symbols, depending on how
// many 1s or 0s have been sent. This makes it a DC balanced protocol,
// as a correctly implemented stream will have (almost) an equal