Skip to content

Instantly share code, notes, and snippets.

@uttaravadina
uttaravadina / main.c
Created January 14, 2021 00:18 — forked from jwhui/main.c
OpenThread Example: receiving raw IPv6 datagrams
/*
* Copyright (c) 2016, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@uttaravadina
uttaravadina / cli_udp_example.cpp
Created January 14, 2021 00:18 — forked from jwhui/cli_udp_example.cpp
UDP Multicast Example
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@uttaravadina
uttaravadina / main.c
Created January 14, 2021 00:17 — forked from jwhui/main.c
OpenThread Example: open UDP socket a boot
/*
* Copyright (c) 2018, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@uttaravadina
uttaravadina / LearnGoIn5mins.md
Created January 5, 2021 17:00 — forked from prologic/LearnGoIn5mins.md
Learn Go in ~5mins
@uttaravadina
uttaravadina / main.c
Created November 26, 2020 10:48 — forked from Nopik/main.c
nRF52840 crash on FreeRTOS
/**
* Copyright (c) 2017 - 2018, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
@uttaravadina
uttaravadina / main.dart
Created October 21, 2020 09:42 — forked from braulio94/main.dart
Flutter - Making a gradeint app body background using decoration
import 'package:flutter/material.dart';
//
// Created by Braulio Cassule
// 30 December 2017
//
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@uttaravadina
uttaravadina / gist:9a4ab7c41d1e74dc3bc8d3054e354ce6
Created October 6, 2020 08:28 — forked from KarenWest/gist:9373354
number of sections in an object file using bfd data structure on Linux using C
My question is in regard to bfd's and how the number of sections work in the following code. The code and the dumps inside the gdb debugger of the bfd structure and it's section structure within it are displayed below. I also included the data structure definitions for the bfd and bfd->sections below. My question is: why when I run this code (executable is called getsections): getsections getsections.o (so pass it the object file for itself) - why is the sections structure blank (all zeroes) and if you look at the bfd->section_count, it has the number 4218960? If you use the Linux command: objdump -h getsections.o, that displays 14 sections (.text, .data, .bss, .rodata, .debug_info, .debug_abbrev, .debug_loc, .debug_aranges, .debug_line, .debug_str, .comment, .comment.SUSE.OPTS, .note-GNU-stack, .eh_frame). I've read what I could find in the BFD documentation on the web, and I'm not sure what I'm doing wrong here since my object file structure is nowhere near what you would see with objdump (14 sections). Any
@uttaravadina
uttaravadina / elgato-eve.md
Created October 6, 2020 02:23 — forked from gomfunkel/elgato-eve.md
Elgato Eve HomeKit Services & Characteristics

Elgato Eve HomeKit Services & Characteristics

A work in progress collection of proprietary and as of yet undocumented HomeKit characteristics and their UUIDs used by Elgato Eve.

This list is not including all Eve accessories available and some services and characteristics still make no sense to me. If you have anything to contribute, please leave a comment. There is no guarantee that the information listed below is correct.

Elgato Eve Energy (Firmware Revision 1.3.1;466)

Service - Characteristic UUID R W Type Description
@uttaravadina
uttaravadina / elgato-eve.md
Created October 6, 2020 01:36 — forked from simont77/elgato-eve.md
Elgato Eve HomeKit Services & Characteristics

Elgato Eve HomeKit Services & Characteristics

A work in progress collection of proprietary and as of yet undocumented HomeKit characteristics and their UUIDs used by Elgato Eve.

Based on the work by gomfunkel and 0ff. Characteristics and data dump for Door, Motion and Thermo thanks to @NebzHB.

More infos not yet incorporated in the comment section.

This list is not including all Eve accessories available and some services and characteristics still make no sense to me. If you have anything to contribute, please leave a comment. There is no guarantee that the information listed below is correct.

@uttaravadina
uttaravadina / CheckNetwork.java
Created September 23, 2020 03:03 — forked from PasanBhanu/CheckNetwork.java
Check Internet Connection in Android (API Level 29) Using Network Callback
/*
You need to call the below method once. It register the callback and fire it when there is a change in network state.
Here I used a Global Static Variable, So I can use it to access the network state in anyware of the application.
*/
// You need to pass the context when creating the class
public CheckNetwork(Context context) {
this.context = context;
}