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
So you want to set up remix in cloud run huh? It's pretty simple but i'm going to assume you can figure out most of the GCP UI on your own. | |
Cloud Run: | |
Step 1: Create a new service and take note of the service ID | |
Step 2: Allow all traffic in the /triggers tab | |
Cloud Build: | |
Step 1: Set up a Cloud Build trigger on your repo | |
Step 2: Point the configuration to "cloud build configuration file" at the root of your project | |
Step 3: Add the following to the substitution variables (so you can keep it safe): |
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
import React from "react"; | |
import classnames from "classnames"; | |
import Icons from "bootstrap-icons/bootstrap-icons.svg"; | |
const Icon = ({ | |
className, | |
iconName, | |
height = "1rem", | |
width = "1rem", | |
label, |
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.Net | |
@using System.Text | |
@using Newtonsoft.Json | |
@using Newtonsoft.Json.Linq | |
@{ | |
// The API URL and your API Key | |
string url = "https://dnnapi.com/content/api/ContentItems?contentTypeId=7f0d48be-a6bf-4f3c-9fdf-ba895727e818"; | |
string apikey = "**** INSERT YOUR API KEY 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
// Custom selector to find if something is in the viewport | |
// Adapted from https://stackoverflow.com/a/8897628/13019 | |
jQuery.expr.pseudos.offscreen = function (el) { | |
var rect = el.getBoundingClientRect(); | |
return ( | |
(rect.x + rect.width) < 0 || (rect.y + rect.height) < 0 || (rect.x > window.innerWidth || rect.y > window.innerHeight) | |
); | |
}; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title></title> | |
<style> | |
html, | |
body { |
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
/* | |
Run this in the devtools console on a SharePoint 2010 page when in edit mode, to strip out some spurious crap from the HTML. | |
*/ | |
(function($, window, document) { | |
var $editables = $("[contenteditable], input[type='hidden'][id*='hiddenStorage'], input[type='hidden'][id*='hiddenDisplay'], input[type='hidden'][id^='ctl00'][id$='content']", ".edit-mode"), | |
originalHTML, | |
filterHTML, | |
$el, | |
$filterHTML, |
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
/* | |
Run this in the devtools console on a SharePoint 2010 page when in edit mode, to strip out quite a lot of spurious crap from the HTML. | |
*/ | |
(function($, window, document) { | |
var $editables = $("[contenteditable], input[type='hidden'][id*='hiddenStorage'], input[type='hidden'][id*='hiddenDisplay'], input[type='hidden'][id^='ctl00'][id$='content']"), | |
originalHTML, | |
filterHTML, | |
$el, | |
$filterHTML, |
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
function countCSSRules() { | |
var results = '', | |
log = '', | |
slen = document.styleSheets.length; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < slen; i++) { | |
countSheet(document.styleSheets[i]); | |
} |
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
[{"key":"300x400","name":"Very small screen","width":300,"height":400},{"key":"320x480","name":"iPhone 4","width":320,"height":480},{"key":"320x568","name":"iPhone 5","width":320,"height":568},{"key":"360x640","name":"Nexus 4","width":360,"height":640},{"key":"375x667","name":"iPhone 6","width":375,"height":667},{"key":"414x736","name":"iPhone 6 Plus","width":414,"height":736},{"key":"767x1024","name":"@screen-xs-max","width":767,"height":1024},{"key":"768x1024","name":"@screen-sm-min","width":768,"height":1024},{"key":"991x1280","name":"@screen-sm-max","width":991,"height":1280},{"key":"992x1280","name":"@screen-md-min","width":992,"height":1280},{"key":"1199x801","name":"@screen-md-max","width":1199,"height":801},{"key":"1200x801","name":"@screen-lg-min","width":1200,"height":801},{"key":"1280x600","name":"Netbook","width":1280,"height":600}] |
NewerOlder