Skip to content

Instantly share code, notes, and snippets.

View IsaMorphic's full-sized avatar

IsaMorphic IsaMorphic

View GitHub Profile
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@scottburton11
scottburton11 / gist:3222152
Created August 1, 2012 00:58
Audio Compression for Voiceover

About compression

Audio compression is used to reduce the dynamic range of a recording. Dynamic range is the difference between the loudest and softest parts of an audio signal. It was originally used to guard against defects when cutting wax and vinyl phonograph records, but generally became useful as a way of increasing the loudness of an audio recording without achieving distortion.

The goal of most compression applications is to increase the amplitude of the softest parts of a recording, without increasing the amplitude of the loudest parts.

Compressor anatomy

Compressors generally all have the same conceptual parts. However, not all compressors present variable controls for all parts to the user. If you don't see all of your compressor's controls here, there's a chance it either has a fixed value (and no control), or is named something else:

@aynurin
aynurin / SeekStream.cs
Last active October 23, 2022 13:28
SeekStream allows seeking on non-seekable streams by buffering read data. The stream is not writable yet.
using System;
using System.IO;
namespace Contribs.aynurin
{
/// <summary>
/// SeekStream allows seeking on non-seekable streams by buffering read data. The stream is not writable yet.
/// </summary>
public class SeekStream : Stream
{
@zaphoyd
zaphoyd / basic_client.cpp
Last active June 4, 2023 08:39
An example of a basic WebSocket++ client that sends a message, waits for a response, then closes the connection
#include <websocketpp/config/asio_no_tls_client.hpp>
#include <websocketpp/client.hpp>
#include <iostream>
typedef websocketpp::client<websocketpp::config::asio_client> client;
using websocketpp::lib::placeholders::_1;
using websocketpp::lib::placeholders::_2;
@cjorssen
cjorssen / jiles-atherton.py
Created January 31, 2016 20:46
A crude implementation of jiles-atherton model based on http://physics.stackexchange.com/a/72789/10757
import numpy as np
from matplotlib import pyplot as plt
mu0 = 4 * np.pi * 1e-7 # H/m
a = 470 # A/m
alpha = 9.38e-4
c = 0.0889
k = 483 # A/m
Ms = 1.48e6 # A/m
@gorlok
gorlok / openssl.md
Last active July 3, 2024 23:13
OpenSSL to create PFX file
@IsaMorphic
IsaMorphic / wordfrick.js
Last active October 17, 2019 13:21
Wordfrick is a tampermonkey script that jumbles up the text on any webpage of your choice. The results are oftentimes hilarious.
// ==UserScript==
// @name Wordfrick
// @namespace https://www.chosenfewsoftware.com
// @version 1.0
// @description Screw up any text on any webpage with the click of your mouse
// @author Yodadude2003
// @match *://*/*
// @grant none
// @require https://code.jquery.com/jquery-3.4.1.min.js
// ==/UserScript==
@mjs3339
mjs3339 / BigRational.cs
Last active August 11, 2022 22:38
C# Arbitrary Precision Signed Big Rational Numbers
using System;
using System.Diagnostics;
using System.Globalization;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Text;
[DebuggerDisplay("{" + nameof(DDisplay) + "}")]
[Serializable]
public struct BigRational : IComparable, IComparable<BigRational>, IEquatable<BigRational>
{
@mjs3339
mjs3339 / BigDecimal.cs
Last active August 27, 2021 19:10
Arbitrary Precision Signed BigDecimal
using System;
using System.Diagnostics;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Text;
[Serializable]
[DebuggerDisplay("{DDisplay}")]
public struct BigDecimal : IComparable, IComparable<BigDecimal>, IEquatable<BigDecimal>
{
private const int MaxFactorials = 200;