This file contains hidden or 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
/* eslint-disable no-console */ | |
import { cloneDeep } from 'lodash'; | |
type DevConsoleOptions = { | |
errorHandlerName?: string; | |
printStack?: boolean; | |
clone?: boolean; // clone the argument (to create a snapshot at time of execution) ? | |
devMode?: boolean; // boolean value to use instead of NODE_ENV | |
}; |
This file contains hidden or 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
/** | |
* From: https://github.com/suhailsulu/react-carousel-3d ; edited for TS & TW | |
*/ | |
import { useState, useEffect, useRef } from 'react'; | |
import { useSwipeable } from 'react-swipeable'; | |
import './3dCarouselStyles.css'; | |
interface CarouselProps { | |
slides: |
This file contains hidden or 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 running, execute Set-ExecutionPolicy RemoteSigned so that your PowerShell will allow it to run | |
$ErrorActionPreference="Stop" | |
Write-Host "Cleaning up packages and fstrim - " -NoNewLine | |
$SUDOSECUREPASSWORD = Read-Host "please enter your sudo password" -AsSecureString | |
Write-Host "" | |
# convert to usable String | |
$SUDOPASSWORD = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($SUDOSECUREPASSWORD)) |
This file contains hidden or 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
// last element in array | |
var lastGesturePointInArray = action.GesturePoints.Length - 1; | |
// pixels travelled | |
var distanceTravelled = action.GesturePoints[lastGesturePointInArray].X - action.GesturePoints[0].X; | |
// Edit if need be: | |
var horizScrollDist = 1.5; | |
// turn to absolute num |