Skip to content

Instantly share code, notes, and snippets.

View OllyHodgson's full-sized avatar

Olly Hodgson OllyHodgson

View GitHub Profile
@donker
donker / Login.ascx
Created March 7, 2019 08:47
Login screen skin page for DNN
<%@ 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
@mikowl
mikowl / oneliners.js
Last active February 19, 2025 05:20
👑 Awesome one-liners you might find useful while coding.
// 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);
@TheRealFlyingCoder
TheRealFlyingCoder / Cloud Run & Remix
Last active February 14, 2025 00:19
Remix & Cloud Run
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):
@char0n
char0n / start.js
Last active May 5, 2022 21:47
Create React App override for start script using rewire library
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);