Skip to content

Instantly share code, notes, and snippets.

@gartes
gartes / magento unnecessary apache modules
Created May 1, 2018 07:17 — forked from zztimur/magento unnecessary apache modules
magento - apache modules that are not needed
Here is the list of apache modules which we were able to disable safely. This list is published just to give you idea, so be careful and consider your specific needs before disabling these.
Here is the list
proxy
proxy_ajp
proxy_balancer
proxy_connect
proxy_ftp
proxy_http
@gartes
gartes / rwd.css
Created May 7, 2018 07:58 — forked from apzeero/rwd.css
CSS: Twitter Bootstrap Breakpoints
/* http://twitter.github.com/bootstrap/scaffolding.html#responsive */
/* Landscape phones and down */
@media (max-width: 480px) { ... }
/* Landscape phone to portrait tablet */
@media (max-width: 768px) { ... }
/* Portrait tablet to landscape and desktop */
@media (min-width: 768px) and (max-width: 940px) { ... }
@gartes
gartes / ua-cities.json
Created May 5, 2020 02:54 — forked from alex-oleshkevich/ua-cities.json
Города Украины
[
{
"name": "Украина",
"regions": [
{
"name": "Автономная Республика Крым",
"cities": [
{
"name": "Алупка",
"lat": "44.4197222",
@gartes
gartes / storage.js
Created May 7, 2020 19:37 — forked from azjezz/storage.js
simple storage class for javascript - test included
class Storage {
static get(key) {
let value = localStorage.getItem(key);
return value === null ? null : JSON.parse(value);
}
static set(key,value) {
return localStorage.setItem(key,JSON.stringify(value));
}
@gartes
gartes / namecase.php
Created December 3, 2020 20:12 — forked from ivanscm/namecase.php
Модуль склонения личных имен существительных по падежам.
<?php
###################################################
# Модуль склонения личных имен существительных по падежам
# Кодинг Иван Григорьев aka IvanSCM
# Склонения по падежам подготовил Лапин Алексей aka NuBiK
@gartes
gartes / jivosite.html
Created April 14, 2021 15:30 — forked from Inontran/jivosite.html
код живосайта с lazyload
<script type='text/javascript'>
(function(){ document.jivositeloaded=0;var widget_id = 's8C7P8lJSp';var d=document;var w=window;function l(){var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '//code.jivosite.com/script/widget/'+widget_id; var ss = document.getElementsByTagName('script')[0]; ss.parentNode.insertBefore(s, ss);}//эта строка обычная для кода JivoSite
function zy(){
//удаляем EventListeners
if(w.detachEvent){//поддержка IE8
w.detachEvent('onscroll',zy);
w.detachEvent('onmousemove',zy);
w.detachEvent('ontouchmove',zy);
w.detachEvent('onresize',zy);
}else {
/*jslint continue:true*/
/**
* Adapted from {@link http://www.bulgaria-web-developers.com/projects/javascript/serialize/}
* Changes:
* Ensures proper URL encoding of name as well as value
* Preserves element order
* XHTML and JSLint-friendly
* Disallows disabled form elements and reset buttons as per HTML4 [successful controls]{@link http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2}
* (as used in jQuery). Note: This does not serialize <object>
* elements (even those without a declare attribute) or
@gartes
gartes / breakpoints.css
Created August 4, 2021 10:27 — forked from fmtarif/breakpoints.css
#css breakpoints
/* css-tricks.com/snippets/css/media-queries-for-standard-devices/ */
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@gartes
gartes / my-counter.js
Created October 17, 2021 19:22
Web Component Example
const template = document.createElement('template');
template.innerHTML = `
<style>
* {
font-size: 200%;
}
span {
width: 4rem;
display: inline-block;
@gartes
gartes / _WebStorm Babel file-watcher setup basics.md
Last active November 26, 2021 09:56
WebStorm/PHPStorm (and so on...) Babel file-watcher setup basics

Basic Babel file-watcher setup

ZXCV

This requires NPM to be installed.

Adding file-watchers

package.json file