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/perl | |
use strict; | |
my $VERSION = '1.0'; | |
my $PL_START = "000000000000FACEB003AABBCCDD"; | |
my $PL3_START ="505347726F6F7665"; | |
my $PL3_END = "1201000200000008AAAABBBB"; | |
my $PL_SIZE = 3822; | |
my $in; |
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
static const char *PL_START = "000000000000FACEB003AABBCCDD"; | |
static const char *PL3_START = "505347726F6F7665"; | |
static const char *PL3_END = "1201000200000008AAAABBBB"; | |
unsigned int PL_SIZE = 3822; | |
int hex2bin(char *hex_file, char *bin_file) { | |
FILE *infile, *outfile; | |
char line[100]; | |
char buffer[50*1024]; | |
char outc = 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
Index: bin/ocra | |
=================================================================== | |
--- bin/ocra (revision 2cb11c915af52197f90abd944d84219305d8c602) | |
+++ bin/ocra (revision ) | |
@@ -181,7 +181,7 @@ | |
IGNORE_GEMFILES = %r{( | |
# Auxiliary files in the root of the gem | |
- ^(\.\/)?(History|Install|Manifest|README|Licen[sc]e|Contributors|ChangeLog|BSD|GPL).*$ | | |
+ ^(\.\/)?(History|Install|Manifest|README|CHANGES|Licen[sc]e|Contributors|ChangeLog|BSD|GPL).*$ | |
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 <gtk/gtk.h> | |
#include <glib.h> | |
#include <glib/gprintf.h> | |
void map_cb(GtkWidget *widget, gpointer data) | |
{ | |
gtk_window_set_keep_above(GTK_WINDOW(widget), TRUE); | |
g_print("gtk fullscreen window active\n"); | |
FILE *fp = fopen("/var/tmp/crfswin.running", "w"); | |
fclose(fp); |
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
# 1. Open https://link.springer.com/search/page/1?facet-content-type=%22Book%22&package=mat-covid19_textbooks | |
# 2. Click on the button on the top right of the table to save results into CSV file (SearchResults.csv) | |
# 3. Run: python springer.py SearchResults.csv | |
# Note: Python 3 is needed, `pip install requests` if the module is missing | |
import sys | |
import csv | |
import requests | |
from pathlib import Path | |
from os import path |
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
blueprint: | |
name: Aqara Wireless Switch (single, double, hold, release) | |
description: 'Control anything using Aqara Wireless Switch. | |
Customizable actions for each press. | |
This version of the blueprint is for buttons supporting single, double, hold and | |
release actions. ' | |
domain: automation |
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
blueprint: | |
name: Philips Hue Dimmer switch v2 (Zigbee2MQTT) | |
description: | |
"Tested with Philips Hue Smart Wireless Dimmer Switch V2 (929002398602). | |
\n\n | |
To have different actions on short press and on hold (long press), use 'button release' (`*_press_release`) and 'button hold once' (`*_hold_once`) commands, | |
as 'press' (`*_press`) will always trigger before 'button hold' (`*_hold`). | |
\n\n | |
When you hold a button, 'button hold' (`*_hold`) command is repeated roughly once per second. This may not work as desired with actions like toggling light/switch. | |
If you want an action to run only once when the button hold action is registered, use 'button hold once' (`*_hold_once`). It's better than using 'button hold release' |
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
blueprint: | |
name: Sengled light switch (Zigbee2MQTT) | |
description: 'Control anything using Sengled E1E-G7F smart light switch / dimmer. | |
Customizable actions for each press. | |
Supported actions: on, on_double, on_long, up, up_long, down, down_long, off, off_double, off_long. | |
Note: up/down actions always trigger before up_long/down_long. This is not the case for on/off actions. | |
' |