Skip to content

Instantly share code, notes, and snippets.

View hasan-hasanov's full-sized avatar

Hasan Hasanov hasan-hasanov

View GitHub Profile

Keybase proof

I hereby claim:

  • I am hasan-hasanov on github.
  • I am hasan_hasanov (https://keybase.io/hasan_hasanov) on keybase.
  • I have a public key ASB0Zj5MDwWdbh24FlzZED69JILqK8wJEQBq6RYW7xgL8go

To claim this, I am signing this object:

@hasan-hasanov
hasan-hasanov / PurpleTheme.json
Last active December 2, 2021 18:06
Themes for Windows Terminal
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
},
@hasan-hasanov
hasan-hasanov / ClockWeather
Last active October 17, 2021 01:07
Simple clock, date, weather theme for Rainmeter. In order to work correctly please fill the variables section. This skin is based on https://visualskins.com/skin/mond which looks like it is not supported currently.
[Rainmeter]
Update=1000
Author=Hasan-Hasanov
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
[Variables]
Unit=m
@hasan-hasanov
hasan-hasanov / WavParser.cs
Last active October 8, 2023 07:32
Simple code snippet that parses most of .wav files. This is not full blown parser but at least it should give you an idea. I followed the specification from here: http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
class Program
{
static void Main(string[] args)
{
using (var file = File.Open(args[0], FileMode.Open))
{
BinaryReader reader = new BinaryReader(file);
// Contains the letters "RIFF" in ASCII form.
string riffChunkId = Encoding.ASCII.GetString(reader.ReadBytes(4));
@hasan-hasanov
hasan-hasanov / BleDemo.cs
Created April 24, 2021 22:36
Bluetooth Low Energy Example
class Program
{
static async Task Main(string[] args)
{
var watcher = new BluetoothLEAdvertisementWatcher();
watcher = new BluetoothLEAdvertisementWatcher()
{
ScanningMode = BluetoothLEScanningMode.Passive
};
@hasan-hasanov
hasan-hasanov / CompleteSandboxConfig.xml
Created November 25, 2020 23:25
Sample code for medium article.
<Configuration>
<VGpu>Disabled</VGpu>
<Networking>Default</Networking>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\Users\YOUR_USERNAME\Desktop\Scripts</HostFolder>
<SandboxFolder>C:\Users\WDAGUtilityAccount\Desktop\Sandbox\</SandboxFolder>
<ReadOnly>false</ReadOnly>
</MappedFolder>
</MappedFolders>