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
diff -ur fx3_sdk_1_3_4_src/sdk/firmware/src/system/cyu3vic.c fx3_sdk_1_3_4_src.patched/sdk/firmware/src/system/cyu3vic.c | |
--- fx3_sdk_1_3_4_src/sdk/firmware/src/system/cyu3vic.c 2017-11-24 09:45:52.000000000 +0800 | |
+++ fx3_sdk_1_3_4_src.patched/sdk/firmware/src/system/cyu3vic.c 2020-01-09 16:46:45.146468433 +0800 | |
@@ -34,12 +34,18 @@ | |
#define CY_U3P_WDT1_DISABLE_MASK (CY_U3P_GCTL_MODE1_MASK) | |
#define CY_U3P_WDT1_MODE_INTR_MASK (1 << CY_U3P_GCTL_MODE1_POS) | |
-/* Assuming timer clock frequency as 32KHz */ | |
-#define CY_U3P_OS_TIMER_TICK_OFFSET (7) | |
-#define CY_U3P_OS_TIMER_TICK_COUNT (32) |
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
-----BEGIN CERTIFICATE----- | |
MIIF0jCCA7qgAwIBAgIJAKn+dW2ea5S0MA0GCSqGSIb3DQEBCwUAMHYxCzAJBgNV | |
BAYTAlVTMQswCQYDVQQIDAJUWDEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwP | |
RmxpZ2h0QXdhcmUgTExDMRMwEQYDVQQLDApPcGVyYXRpb25zMRkwFwYDVQQDDBBG | |
bGlnaHRBd2FyZSBSb290MB4XDTE1MTIwOTE2NTAwNFoXDTM1MTIwNDE2NTAwNFow | |
djELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAlRYMRAwDgYDVQQHDAdIb3VzdG9uMRgw | |
FgYDVQQKDA9GbGlnaHRBd2FyZSBMTEMxEzARBgNVBAsMCk9wZXJhdGlvbnMxGTAX | |
BgNVBAMMEEZsaWdodEF3YXJlIFJvb3QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw | |
ggIKAoICAQDTlR/hn6y+RqUVZnRxc9Wp0mQaYJpXEDBAzAVUipXdertL1c0mYqda | |
22J9E0ubZS5nqYXhj9/YHN0G8fP9LmTjzB4mxH0TZCRTglNCsQDzKLuxnt1ynHCl |
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
// g++ -Wall -O -o sdlgpu-test $(pkg-config SDL2_gpu --cflags) $(sdl2-config --cflags) sdlgpu-test.cc $(pkg-config SDL2_gpu --libs) $(sdl2-config --libs) | |
#include <SDL_gpu.h> | |
int main(int argc, char* argv[]) | |
{ | |
GPU_SetDebugLevel(GPU_DEBUG_LEVEL_MAX); | |
GPU_Target* screen = GPU_Init(400, 300, GPU_DEFAULT_INIT_FLAGS); | |
if (!screen) |
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
#!/usr/bin/env python3 | |
import math, sys | |
from contextlib import closing | |
def normal_cdf(x, mu, sigma): | |
return 0.5 * (1 + math.erf((x - mu) / (sigma * math.sqrt(2)))) | |
def rng_normal_cdf(x, hi): | |
mu = hi / 2.0 |
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
#!/usr/bin/env tclsh8.6 | |
package require tls | |
proc testit {host port} { | |
puts "connecting to $host $port" | |
set sock [tls::socket -cipher ALL \ | |
-ssl2 0 \ | |
-ssl3 0 \ | |
-tls1 1 \ |
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
- install the two shellscripts into the appropriate places under /etc/initramfs-tools | |
- run update-initramfs | |
- put "overlay=yes" on the kernel command line | |
- reboot | |
With the overlay in place, the real root is mounted readonly on /ro. | |
Only the root fs is changed, other filesystems are mounted normally. | |
Remove "overlay=yes" (or change it to something other than yes) and reboot to go back to readwrite. | |
(This probably means that you want the commandline config to live somewhere other than on the root fs, e.g. under /boot) |
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
package require kafka | |
proc the_delivery_callback {message} { | |
puts stderr "delivery callback: $message" | |
set ::die 1 | |
} | |
proc the_error_callback {message} { | |
puts stderr "error callback: $message" | |
set ::die 1 |