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
/** | |
* 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 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 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 |