Skip to content

Instantly share code, notes, and snippets.

Shreyas Balakrishna shreyasbharath

  • Auckland, New Zealand
Block or report user

Report or block shreyasbharath

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View BSP code
void bsp_rtc_wdt_enable(uint32_t time_ms)
rtc_wdt_set_length_of_reset_signal(RTC_WDT_SYS_RESET_SIG, RTC_WDT_LENGTH_3_2us);
rtc_wdt_set_time(RTC_WDT_STAGE0, 150000, time_ms); // Running off internal RC oscillator at 150 KHz
shreyasbharath / .block
Created Mar 30, 2018
Selections: Data example
View .block
license: mit
View .block
license: mit
View settings
# name: Ctrl-D exits
# type: bool
# Ctrl-D exits the process when it is pressed on an empty line.
ctrld_exits = 1
# name: Ctrl-C raises exception
# type: bool
# When Ctrl-C is pressed Clink will pass it thourgh to the parent by raising the
# appropriate exception.
passthrough_ctrlc = 1
shreyasbharath / fs_vs_db.rb
Last active Dec 20, 2017
FileSystem vs Database
View fs_vs_db.rb
require 'benchmark/ips'
require 'daybreak'
require 'dbm'
require 'fileutils'
require 'sqlite3_hash'
require 'xxhash'
class DaybreakDb
def initialize(db_file)
@db_file = db_file
shreyasbharath / hexdump.cpp
Created Oct 13, 2017
Hexdump - C++ version of XXD style hexdump (based on this StackOverflow answer
View hexdump.cpp
#include <termcolor.hpp>
void HexDumpMemory(const std::vector<uint8_t>& bytes, std::ostream& stream)
char_t buff[17];
size_t i = 0;
stream << std::hex;
// Process every byte in the data.
You can’t perform that action at this time.