Skip to content

Instantly share code, notes, and snippets.

View Ibochkarev's full-sized avatar
🏠
Working from home

Bochkarev Ivan Ibochkarev

🏠
Working from home
View GitHub Profile
@Ibochkarev
Ibochkarev / ios-chrome-devtools.md
Created May 17, 2023 04:33 — forked from james2doyle/ios-chrome-devtools.md
Enable remote debugging on the iOS simulator using Chrome Dev Tools

Install the tools:

brew install ios-webkit-debug-proxy

Run the simulator. And choose an iOS 10 device. The chrome remote debugging doesn't work with iOS 11 yet.

Enable the inspector

@Ibochkarev
Ibochkarev / gist:1119876d3c5662d0958ba7ff76f2e2c7
Created May 14, 2023 16:38 — forked from jenswittmann/gist:97bc2e295bac7d2619ed4505641bed52
Use MODX BabelLinks snippet for canonical Metatags
# add snippet into <head>
[[BabelLinks?
&tpl=`babelCanonicalTag`
&showCurrent=`1` ]]
# create chunk with name babelCanonicalTag
<link rel="alternate" hreflang="[[+cultureKey]]" href="[[+url]]">
import Swiper from "swiper/bundle";
import "swiper/swiper-bundle.css";
window.addEventListener(
"load",
() => {
// swiper
var slider = document.querySelectorAll(".swiper-container");
for (let index = 0; index < slider.length; index++) {
slider[index].classList.add("swiper-container-" + index);
<?php
/**
 * Created by PhpStorm.
 * User: pg
 * Date: 30.01.19
 * Time: 18:10
 */
 
function getPublicInfo($tag) {
@Ibochkarev
Ibochkarev / .htaccess
Created April 22, 2019 03:19 — forked from splittingred/.htaccess
Example of how to use new REST server class in MODX 2.3+
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.*)$ rest/index.php?_rest=$1 [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ rest/index.php [QSA,NC,L]
</IfModule>
@Ibochkarev
Ibochkarev / sticky_footer.html
Created April 5, 2019 07:11 — forked from droganaida/sticky_footer.html
3 способа, как прижать footer к низу страницы
@Ibochkarev
Ibochkarev / mfilter_history.txt
Last active March 24, 2019 07:49 — forked from petyagrill/mfilter_history.txt
Сохранение истории фильтрации и пагинации
// js
<script>
if(typeof addResults === "undefined"){
var page = 1;
} else {
var page = addResults;
}
@Ibochkarev
Ibochkarev / MIGX fenom
Created March 15, 2019 05:01 — forked from Sentinel-7/MIGX fenom
MIGX fenom
{foreach $_modx->resource['adv.Index'] | fromJSON as $item}
<div class="col-xs-12 col-sm-6 col-md-4">
<div class="icon-box left media p-0 mb-40">
<div class="media-left pull-left"><i class="{$item['icon']} text-theme-colored"></i></div>
<div class="media-body">
<p class="media-heading heading h5">{$item['title']}</p>
<p>{$item['desc']}</p>
</div>
</div>
</div>
@Ibochkarev
Ibochkarev / gist:e726eef3b53efdc95c74837ca2af0697
Created February 14, 2019 14:17 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Ibochkarev
Ibochkarev / Messages
Created February 2, 2019 10:27 — forked from sottwell/Messages
Dashboard Widget to display the number of internal Manager messages the user has - MODX Revoluition
// Dashboard widget to show number of Manager messages
$id = $modx->user->get('id');
$output = 'No messages.';
$total = $modx->getCount('modUserMessage',array(
'recipient' => $id,
));
if($total) {
$output = 'You have ' . $total . ' messages';
$unread = $modx->getCount('modUserMessage',array(
'recipient' => $id,