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
// !! DISCLAIMER !! I'm still a beginner at Typescript and only mediocre at javascript. | |
// If you see any sort of mistake please do feel free to comment. | |
// This gist was created because I was trying to figure out how to port out | |
// some old js codes to typescript and I had to deal with libraries with no @types files. | |
/*------------------------------------------*/ | |
// BEFORE YOU START | |
// If you want to totally ignore with the whole typing thing for functions | |
// Just declare this in your Typescript file | |
declare var function_name_here: any; // if the function returns something |
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
<!-- Had a bootstrap modal that didn't close fully before the another modal is called --> | |
<!-- from googling around most people reccomended acting on the hidden events --> | |
<!-- but I only wanted it to work only when a specific function is called --> | |
<!-- EVENTS MAY DIFFER FROM VERSION TO VERSION --> | |
<!-- https://getbootstrap.com/docs/4.0/components/modal/#events --> | |
<!-- | |
$("your jquery selector here").one('your choice of events', function(e) { | |
// Do something here | |
}); |
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
// I was getting an empty grid even though the POST request returned a [200] response | |
// and there was data in the response body when I checked the browser console. | |
// | |
// Turns out .NET Core MVC has a behavior of formatting anything that passes the Json() function to be camelCased. | |
// Telerik Kendo was probably looking for something like "response.Data" but the response gave "response.data", note the lowercase | |
// Go to your Startup.cs in your project and add the following to the MVC services | |
services.AddMvc() | |
.AddJsonOptions(option => option.SerializerSettings.ContractResolver = new DefaultContractResolver()); // Add JsonOptions |
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
Get-ChildItem -Include ~BROMIUM -Recurse -Force | Remove-Item -Recurse -Force |