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
/* Slick needs no get Reinitialized on window Resize after it was destroyed */ | |
$(window).on('load resize orientationchange', function() { | |
$('.carousel').each(function() { | |
var $carousel = $(this); | |
/* Initializes a slick carousel only on mobile screens */ | |
// slick on mobile | |
if ($(window).width() > 768) { | |
if ($carousel.hasClass('slick-initialized')) { | |
$carousel.slick('unslick'); | |
} |
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
var foo = ( | |
bar === 'a' ? 1 : // if | |
bar === 'b' ? 2 : // else if | |
bar === 'c' ? 3 : // else if | |
null // else | |
); |
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
SELECT * FROM `wp_posts` ORDER BY `wp_posts`.`post_date` DESC | |
Drop column | |
ALTER TABLE wp_posts DROP COLUMN Created; | |
Add column | |
ALTER TABLE wp_posts ADD COLUMN post_author INT DEFAULT 1 AFTER ID; | |
Rename column | |
ALTER TABLE wp_posts CHANGE COLUMN LastEdited post_date DATETIME; |
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
If the resource limit can't be removed by the hosting provider, you could consider using git config to disable preloading of the index (threaded lstat). | |
git config core.preloadIndex false | |
If you need that setting when cloning the initial repository, then you will need to set it globally. | |
git config --global core.preloadIndex false |
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
Step 1. Add the folder path to your repo's root .gitignore file. | |
path_to_your_folder/ | |
Step 2. Remove the folder from your local git tracking, but keep it on your disk. | |
git rm -r --cached path_to_your_folder/ | |
Step 3. Push your changes to your git repo. |
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
sudo /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/123 | |
sudo killall Finder | |
sudo lsof +D "/Volumes/123” | |
mdutil -i off -d /Volumes/123/ | |
rm -r /Volumes/123/.Spotlight-V100/Store-V2/ |
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
navigate to C:\Users\\ and open .yarnrc and manually update it as follows: | |
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | |
# yarn lockfile v1 | |
strict-ssl false |
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, { useEffect, useState } from 'react' | |
import classes from './index.module.scss' | |
const Countdown = () => { | |
const [time, setTime] = useState({ | |
days: 0, | |
hours: 0, | |
minutes: 0, | |
seconds: 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
// Define the array of objects | |
const data = [ | |
{ id: 1, date: '2023-05-15' }, | |
{ id: 2, date: '2023-05-10' }, | |
{ id: 3, date: '2023-05-20' }, | |
// Add more objects as needed | |
]; | |
// Function to sort and filter the array by date range | |
function sortAndFilterByDateRange(array, startDate, endDate) { |
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
Reducer file (reducer.ts) | |
postFiatDepositRequest: (state, { payload }: PayloadAction<IPostFiatDepositWorker>) => { | |
state.fiatTransactionsLoading = true; | |
}, | |
Redux Saga file (saga.ts) | |
function* postFiatDepositWorker({ payload }: PayloadAction<IPostFiatDepositWorker>) { | |
const { apiParams, onFinally } = payload; | |
let hasError = false; | |
try { |
NewerOlder