Skip to content

Instantly share code, notes, and snippets.

@programmin1
programmin1 / Program.cs
Created November 2, 2019 05:57
Some custom IWaveProvider... does not work
class MuLawConversionProvider : IWaveProvider
{
private SampleToWaveProvider16 _sourceBuffer;
private WaveFormat _theformat;
public MuLawConversionProvider(SampleToWaveProvider16 SrcBuffer, WaveFormat theformat)
{
_sourceBuffer = SrcBuffer;
_theformat = theformat;
// Use on https://www.nasdaq.com/market-activity/stocks/alsn/dividend-history
// for example.
// Disclaimer - Not intented or guaranteed for official tax purposes. YMMV
jQuery('.dividend-history__row').each(function(i, e) {
jQuery(e).children().eq(0).on('click', function() {
console.log(this.textContent + ' qualified? held 61 days within ');
let exdiv = new Date(this.textContent);
let dt = exdiv;
dt.setDate(dt.getDate() - 60);
console.log(dt.toDateString());
@programmin1
programmin1 / exif_date.py
Created November 26, 2022 18:14 — forked from ikoblik/exif_date.py
Python script to update image creation and modification dates to the EXIF date.
#!/usr/bin/env python
"""A simple utility to restore file creation and modification
dates back to their original values from EXIF.
This script requires exif module to be installed or the exif
command line utility to be in the path.
To function correctly under windows this script needs win32file and
win32con modules. Otherwise it will not be able to restore the creation