Skip to content

Instantly share code, notes, and snippets.

View gautamdhameja's full-sized avatar

Gautam Dhameja gautamdhameja

View GitHub Profile
@gautamdhameja
gautamdhameja / substrate-demo-module.rs
Last active March 6, 2022 23:38
A minimal Substrate module. Implements a simple token transfer function with token balances stored in module storage.
#![cfg_attr(not(feature = "std"), no_std)]
pub use pallet::*;
#[frame_support::pallet]
pub mod pallet {
use frame_support::{
ensure,
pallet_prelude::{DispatchResult, ValueQuery, *},
};
@gautamdhameja
gautamdhameja / mashup.cs
Created December 3, 2017 20:25
Merge two or more mp3 files in C# using naudio library
/// <summary>
/// Creates a mashup of two or more mp3 files by using naudio
/// </summary>
/// <param name="files">Name of files as an string array</param>
/// These files should be existing in a temporay folder
/// <returns>The path of mashed up mp3 file</returns>
public static string CreateMashup (string[] files) {
// because there is no mash up with less than 2 files
if (files.Count () < 2) {
throw new Exception ("Not enough files selected!");
@gautamdhameja
gautamdhameja / keybase.md
Last active January 4, 2020 15:26
Keybase

Keybase proof

I hereby claim:

  • I am gautamdhameja on github.
  • I am gautamdhameja (https://keybase.io/gautamdhameja) on keybase.
  • I have a public key ASAMfbej4iZQb9ltgh4y17jp_KIY3GAFXahm3Hdb6ChUIwo

To claim this, I am signing this object:

@gautamdhameja
gautamdhameja / FirmataWithDHTAndIRemote.cpp
Last active August 14, 2018 12:59
Arduino - here’s how to integrate DHT and IRemote libraries with Standard Firmata to read temperature and infrared sensors and send data using Firmata.sendString()
/*
Firmata is a generic protocol for communicating with microcontrollers
from software on a host computer. It is intended to work with
any host computer software package.
To download a host software package, please clink on the following link
to open the list of Firmata client libraries your default browser.
https://github.com/firmata/arduino#firmata-client-libraries