Skip to content

Instantly share code, notes, and snippets.

View RishatHM's full-sized avatar

Rishat Haydarshin RishatHM

  • 10:08 (UTC +05:00)
View GitHub Profile
@RishatHM
RishatHM / readme.md
Created March 7, 2022 06:40 — forked from ubergesundheit/readme.md
systemd traefik.service

systemd Service Unit for Traefik

Adapted from caddy systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

@RishatHM
RishatHM / bgxml-gen
Created July 20, 2020 14:46 — forked from eternal-sorrow/bgxml-gen
Generate auto changing wallpater XML file for GNOME
#!/bin/bash
#finishing script function
die()
{
if ! [ -z $2 ]
then
rm -f $2
fi
echo "Exiting..."
@RishatHM
RishatHM / gist:9dc484eed071a147770cf11859e28ae6
Last active July 19, 2020 17:19
Logitech MX Ergo CIDs and config example
https://wiki.archlinux.org/index.php/Logitech_MX_Master
0xed for the DPI button
0x52 for scroll click
0x5b for scroll left
0x5d for scroll right
0x56 for forward
0x53 for back
cfg:
@RishatHM
RishatHM / scroll-top.html
Created December 13, 2018 11:16 — forked from agragregra/scroll-top.html
Scroll Top Button
<div class="top" title="Наверх"><i class="fa fa-angle-double-up"></i></div>
.top
position: fixed
bottom: 25px
background-color: #E0E0E0
border-radius: 10em
color: #666
font-size: 26px
width: 50px
@RishatHM
RishatHM / nodejs-gulp-install.txt
Created December 13, 2018 11:16 — forked from agragregra/nodejs-gulp-install.txt
Node.js + Gulp installation (Ubuntu) one line command
1. Simple (Node.js LTS, Gulp, rimraf, NCU):
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
2. Advanced (Node.js LTS, Gulp, rimraf, NCU, Ruby, Jekyll, Jekyll paginate)
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl ruby2.5 ruby2.5-dev gcc make g++ libffi-dev; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo gem i jekyll; sudo gem i jekyll-paginate-v2; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
3. Длинна командной строки (добавить PROMPT_DIRTRIM=3 в конец и сохранить файл):
sudo nano ~/.bashrc
PROMPT_DIRTRIM=3
@RishatHM
RishatHM / jquery-active.js
Created December 13, 2018 11:12 — forked from agragregra/jquery-active.js
jQuery Active Menu
//Active menu
$("li a").each(function() {
if (this.href == window.location.href) {
$(this).addClass("active");
}
});
@RishatHM
RishatHM / scroll-next.js
Created December 13, 2018 11:10 — forked from agragregra/scroll-next.js
jQuery Scroll To Next Section
$(".scroll-next").click(function() {
var cls = $(this).closest(".section").next().offset().top;
$("html, body").animate({scrollTop: cls}, "slow");
});
@RishatHM
RishatHM / migx-sample.js
Last active December 13, 2018 10:45 — forked from agragregra/migx-sample.js
MODX MIGX Sample
Tabs:
[
{"caption":"Tab Title", "fields": [
{"field":"title","caption":"Name"},
{"field":"description","caption":"Description","inputTVtype":"textarea"},
{"field":"imageTV","caption":"Photo","inputTV":"imageTV"}
]}
]
Table:
SASS:
.mfp-ready .mfp-figure
opacity: 0
.mfp-zoom-in
.mfp-figure, .mfp-iframe-holder .mfp-iframe-scaler
opacity: 0
transition: all 0.3s ease-out
transform: scale(0.95)
&.mfp-bg, .mfp-preloader
opacity: 0
<style>
/* ---------------------------------------------- /*
* Mouse animate icon
/* ---------------------------------------------- */
.mouse-icon {
border: 2px solid #000;
border-radius: 16px;
height: 40px;
width: 24px;
display: block;