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
$(window).on("scroll", function() { | |
var fromTop = $(document).scrollTop(); | |
if (docPos > fromTop) { | |
$body.toggleClass("header-fix", fromTop > 20); | |
} else { | |
$body.removeClass("header-fix"); | |
} | |
if (fromTop > 105) { |
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 rewireLess = require('react-app-rewire-less'); | |
module.exports = function override(config, env) { | |
config = rewireLess.withLoaderOptions({ | |
javascriptEnabled: true, | |
})(config, env); | |
return config; | |
}; |
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
function type(value) { | |
var regex = /^\[object (\S+?)\]$/; | |
var matches = Object.prototype.toString.call(value).match(regex) || []; | |
return (matches[1] || 'undefined').toLowerCase(); | |
} |
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 { useEffect, useState } from 'react' | |
export const useDebounce = (value, delay) => { | |
const [debounced, setDebounced] = useState(value) | |
useEffect(() => { | |
const handler = setTimeout(() => setDebounced(value), delay) | |
return () => clearTimeout(handler) | |
}, [value, delay]) |
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
// hooks для того чтобы не импортировать в каждый компонент redux dispath | |
// можно просто импортировать этот файл и брать доступные экшаны | |
import { useDispatch } from 'react-redux' | |
import { bindActionCreators } from 'redux' | |
import { githubActions } from '../store/github/github.slice' | |
// список доступных экшенов | |
const actions = { | |
...githubActions, |
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
# /etc/default/grub | |
GRUB_DEFAULT=saved | |
GRUB_SAVEDEFAULT=true | |
GRUB_TIMEOUT_STYLE=hidden | |
GRUB_TIMEOUT=3 | |
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` | |
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" | |
GRUB_CMDLINE_LINUX="" | |
GRUB_BACKGROUND="/files/pictures/mars.jpg" | |
GRUB_GFXMODE=640x480 |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
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
[user] | |
name = Ramil | |
email = [email protected] | |
[core] | |
editor = nano | |
[init] | |
defaultBranch = main |
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
# установка на ubuntu | |
# sudo apt install android-tools-adb | |
# из форума | |
# https://forum.xda-developers.com/t/guide-debloat-remove-stock-apps-without-root.3935438/ | |
# https://forum.xda-developers.com/t/guide-to-disable-oem-bloatware-aka-system-apps-using-adb-and-fastboot-method-no-root-thread-updated-on-16-08-2021.3779873/ | |
# adb shell pm uninstall -k --user 0 com.miui.home # лаунчер. Если удалить то надо заранее поставить другой и настроить | |
# adb shell pm uninstall -k --user 0 com.oppo.launcher # Стоковый лаунчер OPPO (важно перед этим нужно установить сторонний). | |
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
# https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04 | |
sudo fallocate -l 10G /swapfile && | |
sudo chmod 600 /swapfile && | |
sudo mkswap /swapfile && | |
sudo cp /etc/fstab /etc/fstab.bak && | |
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab /swapfile none swap sw 0 0 |
OlderNewer