Skip to content

Instantly share code, notes, and snippets.

View Sathyaish's full-sized avatar
💭
https://sathyaish.net/ThoughtForTheDay

Sathyaish

💭
https://sathyaish.net/ThoughtForTheDay
View GitHub Profile
@Vardner
Vardner / dropdown
Last active November 4, 2019 09:47
Simple dropdown menu
HTML:
<div data-dropdown="toggle">
<div>Block</div>
<ul data-dropdown="target">
<li>
<a f href="javascript: void(0)" class="category-menu__item-link">
<span>
TEXT
</span>
</a>
@artjomb
artjomb / CryptoJS_byteArrayWordArrayConversions.js
Last active January 9, 2024 16:43
Convert a byte array to a word array and back in CryptoJS-compatible fashion
function byteArrayToWordArray(ba) {
var wa = [],
i;
for (i = 0; i < ba.length; i++) {
wa[(i / 4) | 0] |= ba[i] << (24 - 8 * i);
}
return CryptoJS.lib.WordArray.create(wa, ba.length);
}
@RyannosaurusRex
RyannosaurusRex / RouteConfig.cs
Last active January 19, 2018 02:18
ASP.NET MVC Subdomain Routing
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Sub", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "SubdomainController", action = "AnyActionYouLike", id = UrlParameter.Optional },