Skip to content

Instantly share code, notes, and snippets.

View Dromich's full-sized avatar
🚀
Working...

Роман Хрущ Dromich

🚀
Working...
  • WEB Nibbana
  • Ternopil
View GitHub Profile
@Dromich
Dromich / leaflet_numbered_markers.css
Created September 23, 2022 19:07 — forked from steflef/leaflet_numbered_markers.css
Numbered Markers in Leaflet (JS Mapping)
.leaflet-div-icon {
background: transparent;
border: none;
}
.leaflet-marker-icon .number{
position: relative;
top: -37px;
font-size: 12px;
width: 25px;
@Dromich
Dromich / nginx_opt_media.txt
Created April 6, 2022 08:07
Optimal setting to Nginx for media
location ~* \.(mp3|mp4|3gp)$ {
aio on;
directio 8m;
output_buffers 1 8m;
}
@Dromich
Dromich / install_composer_xampp_ubuntu.md
Created January 27, 2022 11:04 — forked from aalfiann/install_composer_xampp_ubuntu.md
Install composer xampp ubuntu 18

Install composer like so:

sudo curl -s https://getcomposer.org/installer | /opt/lampp/bin/php

After installation, you should then symlink it by running command:

sudo ln -s /opt/lampp/bin/php /usr/local/bin/php

Then run the command below to allow the 'composer' command to be run globally (this will be run from within the folder where you've just installed composer in which a composer.phar file has just been created):

@Dromich
Dromich / .gitignore
Created August 31, 2021 08:53 — forked from redoPop/.gitignore
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
$(document).ready(function () {
const fileSelector = document.querySelector("#file-selector");
fileSelector.addEventListener("change", (event) => {
const fileList = event.target.files;
printFile(fileList[0]);
});
});
function printFile(file) {
var reader = new FileReader();
@Dromich
Dromich / js
Created June 24, 2020 11:56
Eng rus translit
//Если с английского на русский, то передаём вторым параметром true.
transliterate = (
function() {
var
rus = "щ ш ч ц ю я ё ж ъ ы э а б в г д е з и й к л м н о п р с т у ф х ь".split(/ +/g),
eng = "shh sh ch cz yu ya yo zh `` y' e` a b v g d e z i j k l m n o p r s t u f x `".split(/ +/g)
;
return function(text, engToRus) {
var x;
for(x = 0; x < rus.length; x++) {
@Dromich
Dromich / media_mixin
Created March 3, 2020 09:17
responsive mixin
// https://medium.com/codeartisan/breakpoints-and-media-queries-in-scss-46e8f551e2f2
// https://www.w3schools.com/css/css_rwd_mediaqueries.asp
$min-width: 320px; // min screen width
$phone-old: 480px; // Old smartphones
$phone: 640px; // Small tablets and large smartphones (landscape view)
$tablet: 768px; // Small tablets (portrait view)
$laptop: 992px; // Tablets and small desktops
$desktop: 1200px; // Large tablets and desktops
$big-desktop: 1600px; // Large tablets and desktops
@Dromich
Dromich / fotoramaAPI.js
Last active May 17, 2018 14:37
Fotorama_API_sempl
$(function () {
// 1. Initialize fotorama manually.
var $fotoramaDiv = $('#fotorama_cast').fotorama();
// 2. Get the API object.
var fotorama = $fotoramaDiv.data('fotorama');
// 3. Inspect it in console.
console.log(fotorama);
@Dromich
Dromich / date.js
Created January 3, 2018 15:45
Дата на JS
<script language="javascript" >
var d = new Date();//стандарна фкнкція бре дату
var day=new Array("Неділя","Понеділок","Вівторок",
"Середа","Четвер","П'ятниця","Субота");//
var month=new Array("січня","лютого","березня","квітня","травня","червня",
"липня","серпня","вересня","жовтня","січня","грудня");//
document.getElementById('date').innerHTML =day[d.getDay()]+" " +d.getDate()+ " " + month[d.getMonth()]
@Dromich
Dromich / css.html
Created December 11, 2017 12:50
підказки на CSS
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Всплывающая подсказка на CSS</title>
<style>
.photo {
display: inline-block; /* Строчно-блочный элемент */
position: relative; /* Относительное позиционирование */
}