Skip to content

Instantly share code, notes, and snippets.

View applicato's full-sized avatar

applicato

  • Ireland
View GitHub Profile
@applicato
applicato / .vimrc
Created September 6, 2018 15:32 — forked from maxboisvert/.vimrc
" Add this to your vimrc to get a minimalist autocomplete pop
" Or use as a plugin : https://github.com/maxboisvert/vim-simple-complete
" Minimalist-TabComplete-Plugin
inoremap <expr> <Tab> TabComplete()
fun! TabComplete()
if getline('.')[col('.') - 2] =~ '\K' || pumvisible()
return "\<C-P>"
else
@applicato
applicato / CV.hs
Created August 27, 2018 20:41 — forked from denisshevchenko/CV.hs
Моё резюме, написанное на Haskell
{-
Денис Шевченко, 2015
-}
module Main where
import Control.Monad.Writer.Lazy
import Data.Functor ((<$>))
import Data.List (dropWhileEnd)
import Data.Char (isSpace)
@applicato
applicato / instructions.md
Created August 11, 2018 16:17 — forked from sveggiani/instructions.md
[Configure XDebug, Visual Studio Code for a Vagrant VM] #debug #vm #vscode

Configure XDebug, Visual Studio Code for a Vagrant VM

1. Assumptions

  • Project (Drupal) is served on /var/www/html in the Vagrant box
  • Local project files location: c:\Users\username\Work\projects\my-project\repo\html
  • Guest machine IP is 10.0.2.2 (if this doesn't work, run route -nee in the VM and look for the gateway address)

2. Configuration

@applicato
applicato / tutorial.md
Created August 9, 2018 08:34 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@applicato
applicato / github_gpg_key.md
Created August 4, 2018 06:25 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# Mac
// Open this page http://openlayers.org/en/latest/examples/simple.html, execute in the console
// the following code to see events with same color for each type of event
// Code mainly borrowed from https://paul.kinlan.me/monitoring-all-events-on-an-element/
// with adaptation to manage colors and filter events
const html_colors = [
{'name': 'AliceBlue', 'color': '#F0F8FF'},
{'name': 'AntiqueWhite', 'color': '#FAEBD7'},
{'name': 'Aqua', 'color': '#00FFFF'},
{'name': 'Aquamarine', 'color': '#7FFFD4'},
{'name': 'Azure', 'color': '#F0FFFF'},
@applicato
applicato / Arch_Linux_guide.md
Created July 26, 2018 12:17 — forked from danifr/Arch_Linux_guide.md
Arch Linux guide: the always up-to-date Arch Linux tutorial (by Swapnil Bhartiya from muktware.io)

Find the original article written by Swapnil Bhartiya here: http://www.muktware.io/arch-linux-guide-the-always-up-to-date-arch-linux-tutorial/

Arch Linux guide: the always up-to-date Arch Linux tutorial

Download the latest ISO image of Arch Linux. Once you have downloaded the image it’s time to create a bootable USB drive. If you are on a Linux or Mac OS machine, you can use the ‘dd’ utility. If you are on a Windows system then you will have to use tools such as Rufus or USBWriter. If you have Cygwin installed on your Windows machine, then you can also use the ‘dd’

@applicato
applicato / ArchLinux-BeginnersGuide.mediawiki
Created July 26, 2018 12:17
Arch Linux Beginners Guide

This document will guide you through the process of installing Arch Linux using the Arch Install Scripts. Before installing, you are advised to skim over the FAQ.

The community-maintained ArchWiki is the primary resource that should be consulted if issues arise. The IRC channel (irc://irc.freenode.net/#archlinux) and the forums are also excellent resources if an answer cannot be found elsewhere. In accordance with the Arch Way, you are encouraged to type to read the man page of any command you are unfamiliar with.

@applicato
applicato / .md
Created July 25, 2018 14:54 — forked from iAdramelk/.md
Длинная телега про Бутстрап

Английская версия: https://evilmartians.com/chronicles/bootstrap-an-intervention

Вводная часть

У CSS есть несколько базовых проблем, которые позволяют очень быстро отстрелить себе ногу при неправильном использовании:

  1. Глобальный неймспейс – в серверном программировании все что написано в файле, в файле и остается. Все же что написано в css и js засирает глобальное пространство имен со всеми вытекающими. В JS эту проблему сейчас побороли всякими модульными системами, а вот с css сложнее. В идеальном мире это должен починить Shadow DOM и настоящие Web Components, но пока их нет единственный способ с этим бороться – следовать какой-то системе именований селекторов, которая по возможности уменьшает и исключает возможные конфликты.

  2. Каскадность – если на один элемент может сработать несколько правил, то они все и сработают последовательно. Если есть элемент h1.title, на него сработают все правила для тегов h1 и все правила для класса .title. Так как весь html состоит из тегов, то правил которые п

Ща будет длинная простыня текста, готовьтесь. Начнем с задач.

Вот решили мы упороться за скорость загрузки и на каждую страницу сделать бандл в котором у нас будет только используемый на ней CSS-правила

Как нам это сделать? А как не забыть все состояния страницы (авторизован/не авторизован)? А те что из JS добавляются/изменяются?

Или вот мы решили пойти дальше и сократить названия всех нашил CSS-классов для чего-то вроде "aRz", как делает Gmail.

Как нам это сделать везде и ничего не забыть? Да, в JS тоже.