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
@shreyasbharath
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
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
shreyasbharath / hexdump.cpp
Created Oct 13, 2017
Hexdump - C++ version of XXD style hexdump (based on this StackOverflow answer https://stackoverflow.com/a/7776146/801008)
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.