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 <opencv2/core/core.hpp> | |
#include <opencv2/opencv.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <iostream> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <termios.h> | |
using namespace std; | |
using namespace cv; |
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
# | |
# for all who dont like perl: | |
# inputlength = "{sb length: $@L}"; | |
# | |
# with leading spaces: (3 spaces in example) | |
# inputlength = "{sb $[-!3]@L}"; | |
# | |
# with leading char "-" | |
# | |
# inputlength = "{sb $[-!3-]@L}"; |
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 <Servo.h> | |
#define MIN_Y 90 | |
#define MAX_Y 180 | |
#define MIN_X 0 | |
#define MAX_X 180 | |
Servo tilt; | |
Servo pan; |
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 <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <openssl/aes.h> | |
uint8_t cbc_key[] = {0x14, 0x0b, 0x41, 0xb2, 0x2a, 0x29, 0xbe, 0xb4, 0x06, 0x1b, 0xda, 0x66, 0xb6, 0x74, 0x7e, 0x14}; | |
uint8_t cbc_msg1[] = {0x4c, 0xa0, 0x0f, 0xf4, 0xc8, 0x98, 0xd6, 0x1e, 0x1e, 0xdb, 0xf1, 0x80, 0x06, 0x18, 0xfb, 0x28, 0x28, 0xa2, 0x26, 0xd1, 0x60, 0xda, 0xd0, 0x78, 0x83, 0xd0, 0x4e, 0x00, 0x8a, 0x78, 0x97, 0xee, 0x2e, 0x4b, 0x74, 0x65, 0xd5, 0x29, 0x0d, 0x0c, 0x0e, 0x6c, 0x68, 0x22, 0x23, 0x6e, 0x1d, 0xaa, 0xfb, 0x94, 0xff, 0xe0, 0xc5, 0xda, 0x05, 0xd9, 0x47, 0x6b, 0xe0, 0x28, 0xad, 0x7c, 0x1d, 0x81}; | |
uint8_t cbc_msg2[] = {0x5b, 0x68, 0x62, 0x9f, 0xeb, 0x86, 0x06, 0xf9, 0xa6, 0x66, 0x76, 0x70, 0xb7, 0x5b, 0x38, 0xa5, 0xb4, 0x83, 0x2d, 0x0f, 0x26, 0xe1, 0xab, 0x7d, 0xa3, 0x32, 0x49, 0xde, 0x7d, 0x4a, 0xfc, 0x48, 0xe7, 0x13, 0xac, 0x64, 0x6a, 0xce, 0x36, 0xe8, 0x72, 0xad, 0x5f, 0xb8, 0xa5, 0x12, 0x42, 0x8a, 0x6e, 0x21, 0x36, 0x4b, 0x0c, 0x37, 0x4d, 0xf4, 0x55, 0x03, 0x47, 0x3c, 0x52, 0x42, |
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 <stdio.h> | |
#include <stdint.h> | |
#include <sys/stat.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <string.h> | |
#include <openssl/evp.h> |
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 <Wire.h> | |
#include "wm_crypto.h" | |
#define TWI_FREQ 400000L | |
#define EC_ADDR 0x52 | |
#define PACKET_SIZE 6 | |
#define REC_EV 0x01 | |
#define REQ_EV 0x02 |
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 --git a/src/discord-handlers.c b/src/discord-handlers.c | |
index d76ff65..07fa0b0 100644 | |
--- a/src/discord-handlers.c | |
+++ b/src/discord-handlers.c | |
@@ -302,12 +302,18 @@ static void discord_handle_server(struct im_connection *ic, json_value *sinfo, | |
} | |
static void discord_post_message(channel_info *cinfo, const gchar *author, | |
- gchar *msg) | |
+ gchar *msg, gboolean is_self) |
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 --git a/src/discord-http.c b/src/discord-http.c | |
index 92c2d5f..48d843d 100644 | |
--- a/src/discord-http.c | |
+++ b/src/discord-http.c | |
@@ -120,6 +120,7 @@ static void discord_http_mfa_cb(struct http_request *req) | |
{ | |
struct im_connection *ic = req->data; | |
+ g_print("%s: %s\n", __func__, req->reply_body); | |
json_value *js = json_parse(req->reply_body, req->body_size); |
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 --git a/src/discord-handlers.c b/src/discord-handlers.c | |
index b38f807..72b9571 100644 | |
--- a/src/discord-handlers.c | |
+++ b/src/discord-handlers.c | |
@@ -84,7 +84,6 @@ static void discord_handle_presence(struct im_connection *ic, | |
} | |
const char *status = json_o_str(pinfo, "status"); | |
- int flags = 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
#include <stdio.h> | |
#include <glib.h> | |
static char *imc_away_alias_list[8][5] = | |
{ | |
{ "Away from computer", "Away", "Extended away", NULL }, | |
{ "NA", "N/A", "Not available", NULL }, | |
{ "Busy", "Do not disturb", "DND", "Occupied", NULL }, | |
{ "Be right back", "BRB", NULL }, | |
{ "On the phone", "Phone", "On phone", NULL }, |