Skip to content

Instantly share code, notes, and snippets.

View bryancasler's full-sized avatar
🦮

Bryan Casler bryancasler

🦮
View GitHub Profile
@mojowen
mojowen / template_example.js
Last active July 20, 2016 13:42
Prep Salsa Template for Facebook Sharing
<?
// Default Values
var title = 'Welcome'; // What it should say on a page that it can't look up the information
var url = 'http://yoururl.org'; // Your base URL
var template = '00000'; //Your Template Key
var org = 'Your Organization'; //Your Org's Name
var chapter = '9999'; //If this is a chaptered page
var description = "Our slogan"; // Default description
var img = "https://www.google.com/images/srpr/logo3w.png"; //The default image
@swapnilmishra
swapnilmishra / Carddetection.js
Last active January 15, 2020 18:28
Javascript function to detect type of debit/credit card
function getCardType(cardNum) {
if(!luhnCheck(cardNum)){
return "";
}
var payCardType = "";
var regexMap = [
{regEx: /^4[0-9]{5}/ig,cardType: "VISA"},
{regEx: /^5[1-5][0-9]{4}/ig,cardType: "MASTERCARD"},
{regEx: /^3[47][0-9]{3}/ig,cardType: "AMEX"},
@absentees
absentees / mc-section.js
Created October 17, 2017 03:16
MJML Component - Mailchimp Section Attributes
import { MJMLElement, helpers } from 'mjml-core'
import cloneDeep from 'lodash/cloneDeep'
import merge from 'lodash/merge'
import React, { Component } from 'react'
const tagName = 'mc-section'
const parentTag = ['mj-container']
const defaultMJMLDefinition = {
attributes: {
'mc:hideable': null,
@AndruC
AndruC / Roll20 Macros.md
Last active July 9, 2024 20:08
Macros that I use to improve my D&D games

Macro Must-Haves

These are my must-have macros for running games online. I make full use of the compendium, which gives these macros access to common actions and rolls, saving me time.

Remember to add /w gm or @{selected|wtype} to hide sensitive info from your players. WTYPE is an attribute used in the 5th Edition OGL character sheet, a prerequisite for most of these.

Here's what my bar looks like.

Macro Quickbar

@xiaochengh
xiaochengh / explainer.md
Last active December 14, 2022 09:21
Explainer: Font Metrics Override Descriptors

Explainer: Font Metrics Override Descriptors

(A newer version is at here, where a new descriptor advance-override is added)

Spec

This doc explains descriptors ascent-override, descent-override and line-gap-override for CSS @font-face rule.

Basic usage: