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
// React Component | |
// Navigation within app will scroll to top. | |
import { Component } from 'react'; | |
import { withRouter } from 'react-router-dom'; | |
class ScrollToTop extends Component { | |
componentDidUpdate(prevProps) { | |
if (this.props.location !== prevProps.location) { | |
window.scrollTo(0, 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
import React, { Component, createRef } from 'react'; | |
class _sharedScrollHandler { | |
functions = [] | |
attached = false; | |
constructor() { | |
this.boundHandler = this.handleScroll.bind(this); | |
this.addFun = this.add.bind(this); | |
this.removeFun = this.remove.bind(this); |
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 keyGeneration = ({ loading, value }) => { | |
return loading | |
? `loading-${value}-${new Date().getTime()}` | |
: `loaded-${value}-${new Date().getTime()}`; | |
}; | |
const Select = forwardRef(function Select( | |
{ | |
id, | |
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
<?php | |
/** | |
* Registers the field ThemeMod | |
* | |
* @return void | |
*/ | |
function gql_theme_mod() { | |
$_mods = get_theme_mods(); | |
$config = array(); |
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
version: '3.7' | |
services: | |
db: | |
image: mariadb:10.1.41 | |
restart: always | |
environment: | |
MYSQL_DATABASE: WORDPRESS | |
MYSQL_USER: WORDPRESS | |
MYSQL_PASSWORD: WORDPRESS |
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
<?php | |
/** | |
* Product Attribute DeDupe | |
* | |
* @package Divide | |
*/ | |
/** | |
* Product Attributes in Woocommerce are only checked in this tables for "register_taxonomy" loop. | |
* Deleting duplicates in this table does not require reassigning IDs. Terms are related to taxonomies by name only. |
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
@echo off | |
REM kill the RDP clipboard to prevent errors... | |
taskkill /f /t /im rdpclip.exe | |
REM disconnects all active RDP sessions... | |
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do ( | |
%windir%\System32\tscon.exe %%s /dest:console | |
) |
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
./+o+- jon@Gateway | |
yyyyy- -yyyyyy+ OS: Ubuntu 21.04 hirsute | |
://+//////-yyyyyyo Kernel: x86_64 Linux 5.11.0-37-generic | |
.++ .:/++++++/-.+sss/` Uptime: 2h 4m | |
.:++o: /++++++++/:--:/- Packages: 1656 | |
o:+o+:++.`..```.-/oo+++++/ Shell: bash 5.1.4 | |
.:+o:+o/. `+sssoo+/ Resolution: 1280x800 | |
.++/+:+oo+o:` /sssooo. DE: Xfce | |
/+++//+:`oo+o /::--:. WM: Xfwm4 | |
\+/+o+++`o++o ++////. WM Theme: Greybird |
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
before_script: | |
- apt-get update -y | |
- apt-get install curl -y | |
- curl https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-0.4.1-linux-x86-64.tar.gz -o cwebp.tar.gz | |
- tar -zxvf cwebp.tar.gz | |
- export PATH="$PATH:$(realpath libwebp-0.4.1-linux-x86-64/bin)" | |
# Set these as "RUN" commands and you can use these in any dockerfile. | |
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
# REF: https://kindleit.blogspot.com/2012/09/changing-screen-resolution-with.html | |
# Execute via ``powershell.exe -File .\path-to-script.ps1 1920 1080`` | |
param ( | |
[Parameter(Mandatory=$true, Position = 0)] | |
[int] | |
$Width, | |
[Parameter(Mandatory=$true, Position = 1)] | |
[int] | |
$Height |
OlderNewer