Skip to content

Instantly share code, notes, and snippets.

View artbelov's full-sized avatar
🅿️

Artem Belov artbelov

🅿️
View GitHub Profile
@artbelov
artbelov / frontdays.md
Last active May 15, 2017 13:21
Заявка на «Frontdays» 20/05/2017

Белов Артём «Право.ру» (Самара) – Прогрессивные методы ускорения


Белов Артём — «Право.ру» (Самара)

Фото (800x800)


@artbelov
artbelov / keybase.md
Created August 18, 2016 10:44
keybase.md

Keybase proof

I hereby claim:

  • I am artbelov on github.
  • I am artbelov (https://keybase.io/artbelov) on keybase.
  • I have a public key whose fingerprint is 605C 35C4 4834 628B C615 8409 7EEF 73A8 D2A8 862C

To claim this, I am signing this object:

@artbelov
artbelov / electron-vs-nwjs.md
Last active July 21, 2016 07:53
Кроссплатформенная упаковка приложений с Electron и NW.js
@artbelov
artbelov / index.html
Created September 29, 2015 20:02
AngularJS XML Parse
<!doctype html>
<html ng-app="app" class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
</head>
<body ng-controller="xmlCtrl">
<div class="xml">
{{result.testsuite.testcase | json}}

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Mac Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you will see an error like this:

$ npm update npm -g
@artbelov
artbelov / README.md
Last active August 29, 2015 14:18 — forked from nicerobot/README.md

To run this, you can try:

curl -ks https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

@artbelov
artbelov / SVG-RegExp.md
Last active August 29, 2015 14:16
HTML5 SVG Logo

Захват тега — <tag[^>]*?>[\s\S]*?<\/tag>

Захват тега с атрибутами — \s[^\s]*?=\"[^"]*\"

Захват тега без атрибута attr — \sattr=[\"''][^"]*[\"'']

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1"
@artbelov
artbelov / ms2_checkout_info.php
Last active September 14, 2021 10:52
miniShop2: Плагин E-mail уведомления при отправке заказа
<?php
switch ($modx->event->name) {
case 'msOnChangeOrderStatus':
if ($status == 3) {
$modx->getService('error', 'error.modError');
$modx->getService('mail', 'mail.modPHPMailer');
$modx->setLogLevel(modX::LOG_LEVEL_INFO);
$modx->setLogTarget('FILE');
$modx->log(modX::LOG_LEVEL_INFO, 'Заказ №' . $order->get('id'));
@artbelov
artbelov / Compass_Make_Sprite_Icons.sass
Last active August 29, 2015 14:00
Compass: Make Sprite Icons
// Import Compass
@import compass
// Get Sprite Map
$icons: sprite_map('icons/*.png')
// Set Common Class
[class^="icon-"],[class*=" icon-"]
display: inline-block
background-image: $icons