Skip to content

Instantly share code, notes, and snippets.

View ajsb85's full-sized avatar
👨‍💻
Every day is a brand new day

Alexander Salas Bastidas ajsb85

👨‍💻
Every day is a brand new day
View GitHub Profile
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#include <assert.h>
static void set_time(void);
static void get_time(void);
int main(void)
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
static void set_time(void);
static void get_time(void);
void app_main(void)
{
#include <Arduino.h>
#include <mbedtls/aes.h>
#define PROCESS_FAIL -1
int encrypt(uint8_t *input, uint8_t size, uint8_t key[16], uint8_t *encrypt) {
mbedtls_aes_context encryptContext;
uint8_t iv[16] = {0};
int ret = 0;
@xidameng
xidameng / ameba_RTL8722DM_add_more_GPIO.cpp
Last active August 29, 2021 02:34
There are 2 files need to update in order to add support for more GPIO pins
// "variant.cpp"
PinDescription g_APinDescription[TOTAL_GPIO_PIN_NUM]=
{
{PB_2, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D0
{PB_1, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D1
{PB_3, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D2
{PB_31, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D3
{PB_30, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D4
{PB_28, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D5
@ubidefeo
ubidefeo / NanoRP2040_OSC.ino
Created May 18, 2021 12:56
OSC Message sender for Arduino Nano RP2040 Connect
/* This Sketch is tested on
* - Nano 33 RP2040 Connect
* - Nano 33 IoT
* - MKR WiFi 1010
To compile and use it requires
Libraries:
- CNMAT OSC Library (https://github.com/CNMAT/OSC) - Arduino Library Manager
- Arduino WiFiNINA (https://github.com/arduino-libraries/WiFiNINA) - Arduino Library Manager
@b01
b01 / download-vs-code-server.sh
Last active September 5, 2024 21:23
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
# Copyright 2023 Khalifah K. Shabazz
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the “Software”),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
@ajsb85
ajsb85 / adb.bash
Created December 6, 2020 11:52
Remote ADB
adb tcpip 5555
adb shell ip route
adb connect 10.0.105.13
/*
* If you are going to connect to the live API server to run a quick
* test that adds new data, such as POIs, with test/imaginary values
* please be responsible and delete them afterwards.
*/
require_once 'Services/OpenStreetMap.php';
$config = array(
// A password file, is a colon delimited file.
@irwincong
irwincong / philips_hue_firmware_api_notes.md
Last active November 16, 2024 00:05
Finding the Philips Hue Firmware Download API

Philips Hue Firmware Download API discovery

Laste Update: Fri 05 Jun 2020 02:22:05 PM UTC

Easy Way

With hardware, you could intercept traffic.

Hard(er) Way

  1. Download APK
@leebyron
leebyron / input-union-meeting-2020-5-28.md
Created May 28, 2020 18:54
Input Union Meeting 2020/5/28