// https://hackernoon.com/redux-flow-type-getting-the-maximum-benefit-from-the-fewest-key-strokes-5c006c54ec87
// https://github.com/facebook/flow/issues/4002
// eslint-disable-next-line no-unused-vars
type _ExtractReturn<B, F: (...args: any[]) => B> = B;
export type ExtractReturn = _ExtractReturn<*, F>;
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
const path = require('path'); | |
const rewire = require('rewire'); | |
process.chdir(path.join(__dirname, '..')); | |
const start = rewire('react-scripts/scripts/start.js') | |
const configFactory = start.__get__('configFactory'); | |
const configFactoryMock = (webpackEnv) => { | |
const config = configFactory(webpackEnv); |
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
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf | |
// Remove any duplicates from an array of primitives. | |
const unique = [...new Set(arr)] | |
// Sleep in async functions. Use: await sleep(2000). | |
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
// or | |
const sleep = util.promisify(setTimeout); |
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
<%@ Control language="VB" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %><%@ Register TagPrefix="connect" Namespace="Connect.DNN.Modules.SkinControls" Assembly="Connect.DNN.Modules.SkinControls" %><%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %><%@ Register TagPrefix="dnn" TagName="MENU" Src="~/DesktopModules/DDRMenu/Menu.ascx" %> | |
<%@ Register TagPrefix="dnn" TagName="PRIVACY" Src="~/Admin/Skins/Privacy.ascx" %> | |
<%@ Register TagPrefix="dnn" TagName="TERMS" Src="~/Admin/Skins/Terms.ascx" %> | |
<dnn:DnnCssInclude runat="server" FilePath="css/bootstrap.min.css" PathNameAlias="SkinPath" /> | |
<dnn:DnnCssInclude runat="server" FilePath="css/font-awesome.min.css" PathNameAlias="SkinPath" /> | |
<dnn:DnnCssInclude runat="server" FilePath="css/sb-admin-2.min.css" PathNameAlias="SkinPath" /> | |
<dnn:DnnCssInclude runat="server" FilePath="dnndefault/8.0.0/default.css" PathNameAlias="SharedScripts" Name="dnndefault" Version="8.0 |
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.Data; | |
using System.Data.Sql; | |
using System.Data.SqlClient; | |
using System.Configuration; | |
using DotNetNuke.Services.Mail; | |
using DotNetNuke.Entities.Portals; | |
using DotNetNuke.Common.Utilities; | |
using DotNetNuke.Entities.Portals; |
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
type moment$MomentOptions = { // eslint-disable-line no-unused-vars | |
y?: number|string, | |
year?: number|string, | |
years?: number|string, | |
M?: number|string, | |
month?: number|string, | |
months?: number|string, | |
d?: number|string, | |
day?: number|string, | |
days?: number|string, |
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
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %> | |
<dnn:DnnCssExclude runat="server" Name="dnndefault" /> |
Every single JavaScript engine supports standard timers *
These accept one or more extra argument by specs
for(var i = 0; i < 2; i++) {
setTimeout(function (i) {
console.log(i);
}, 0, i); // <== see this?
}
NewerOlder