This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Wavesurfer.js minimalistic example with | |
* regions loading, save, plugins, waveform loading from json, waveform zoom, player events, keyboard codes, auto play | |
* @author: Loreto Parisi (loretoparisi at gmail dot com) - mainly, some code and functions adpated from Wavesurfer examples | |
* @disclaimer: code adapted from online examples | |
*/ | |
// JavaScript | |
// Wrap the native DOM audio element play function and handle any autoplay errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add following 2 dlls to the script directory | |
# dlls from https://www.nuget.org/packages/Microsoft-WindowsAPICodePack-Shell | |
# and from https://www.nuget.org/packages/Microsoft-WindowsAPICodePack-Core | |
# for some mystical reason the script does not run in ISE but console will do | |
Add-Type -Path "$($PSScriptRoot)\Microsoft.WindowsAPICodePack.Shell.dll" | |
$dialog = New-Object Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog | |
$dialog.IsFolderPicker = $true; | |
if ($Dialog.ShowDialog() -eq [Microsoft.WindowsAPICodePack.Dialogs.CommonFileDialogResult]::Ok) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net5.0</TargetFramework> | |
</PropertyGroup> | |
<!--<Target Name="GenerateResx" AfterTargets="BeforeBuild"> | |
<Message Text="Check Resources.Designer.cs" Importance="high" /> | |
<Message Text="Generating Designer Files..." /> | |
<GenerateResource Sources="@(EmbeddedResource)" StronglyTypedLanguage="cs" StronglyTypedClassName="%(Filename)" StronglyTypedNamespace="@(EmbeddedResource->'%(CustomToolNamespace)')" StronglyTypedFileName="@(EmbeddedResource->'%(RootDir)%(Directory)%(Filename).designer.cs')" PublicClass="true" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
computed: { | |
mistakesHistory() { | |
return this.history.filter((change) => change.type === 'mistake'); | |
}, | |
mistakes() { | |
return this.mistakesHistory.reduce((acc, mistake) => { | |
if (mistake.shift && mistake.expectedText !== ' ') { | |
if (mistake.text.toLowerCase() === mistake.expectedText | |
|| (mistake.text.match(/[~!@#$%^&*()_+{}:"|<>?]/) | |
&& mistake.expectedText.match(/[`1234567890-=[\];'\\,./]/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//!!!!!!!!!!!!!! | |
//Thanks to @thebookisclosed for the code. I just rearranged in a way so you can access without having to use the registry | |
//HINT about compatibility: they CANNOT change feature keys otherwise existing apps would break | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
using Windows.ApplicationModel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Retrieve object from Chrome's Local StorageArea | |
* @param {string} key | |
*/ | |
const getObjectFromLocalStorage = async function(key) { | |
return new Promise((resolve, reject) => { | |
try { | |
chrome.storage.local.get(key, function(value) { | |
resolve(value[key]); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$assemblies=( | |
"System" | |
) | |
$source=@" | |
using System; | |
using Microsoft.Win32; | |
using System.Diagnostics; | |
namespace Helloworld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name * 搜狗/百度/谷歌翻译 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author OnySakura | |
// @include * | |
// @grant GM_xmlhttpRequest | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using System.IO; | |
using System.Diagnostics; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Sockets; | |
NewerOlder