This file contains 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 <WiFi.h> | |
#include <esp_now.h> | |
#include <ezButton.h> | |
#include <esp_wifi.h> | |
uint8_t globalBroadcastAddress[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; | |
// This is the same message structure as WizMote senders. It's reused here to | |
// ensure a common parsable payload, but everything other than seq and button | |
// aren't used by WLED. The ESP-NOW packet has 512 bytes reserved for the message |
This file contains 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 <cassert> | |
#include <iostream> | |
#include <vector> | |
#include <chrono> | |
#include <optional> | |
#include <thread> | |
#include <mutex> | |
#include <unordered_map> | |
#include <algorithm> | |
#include <random> |
This file contains 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
constexpr int portable_ffs(uint32_t mask) { | |
if (std::is_constant_evaluated()) { | |
if (mask == 0) return 0; | |
auto count = 1; | |
while ((mask & 1U) == 0) { | |
mask >>= 1; | |
++count; |
This file contains 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
<UserSettings> | |
<ApplicationIdentity version="16.0"/> | |
<ToolsOptions> | |
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"/> | |
</ToolsOptions> | |
<Category name="Environment_Group" RegisteredName="Environment_Group"> | |
<Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package"> | |
<PropertyValue name="Version">2</PropertyValue> | |
<FontsAndColors Version="2.0"> | |
<Theme Id="{6C6BEAF0-02CD-4211-A593-E3C571711028}"/> |
This file contains 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
git log --format='%aE' | sort -u | while read line ; do printf "\n\n%s\n\n" "$line"; \ | |
git grep -l TODO | xargs -n1 git blame -f -n -e -w | grep "$line" | grep TODO | sed "s/.\{9\}//" | sed "s/(.*)[[:space:]]*//"; done | tee todo_log.txt |
This file contains 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
KeyGetLeftDerivative -filename:FbxMatineeImport.cpp |
This file contains 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
public static void EnableDoubleBuffering<Control>(Control control) | |
where Control : System.Windows.Forms.Control | |
{ | |
typeof(Control).InvokeMember("DoubleBuffered", | |
BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, | |
null, control, new object[] { true }); | |
} |
This file contains 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
sudo llctl f0 l0 d0 | |
echo "killed network leds" | |
sudo echo 0 > /sys/class/leds/led0/brightness | |
sudo echo 0 > /sys/class/leds/led1/brightness | |
echo "killed flash leds" |
This file contains 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
mat4 view; | |
view[0] = vec4(1,0,0,0); | |
view[1] = vec4(0,1,0,0); | |
view[2] = vec4(0,0,1,0); | |
view[3] = vec4(0,0,0,1); | |
mat4 projection; | |
vec2 fov = vec2(45.,45.); | |
float far = 1000.; | |
float near = .5; |
This file contains 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
#import <Foundation/Foundation.h> | |
@interface NSObject (Predicate) | |
/* applies predicate on single object and returns result */ | |
-(BOOL)meetsPredicate:(NSPredicate*)predicate; | |
@end |