Skip to content

Instantly share code, notes, and snippets.

View zoxon's full-sized avatar

Zoxon zoxon

View GitHub Profile
@zoxon
zoxon / html-css-rules.md
Last active May 22, 2022 22:21
Требования к верстке

Требования к верстке

HTML

  1. Форматировать код;
  2. Использовать HTML5 теги;
  3. Семантически называть значения у атрибутов(class, name и т.п);
  4. Запрещается транслит(.hapka, .tovar). Можно заменить на .header, .product;
  5. Запрещается сокращать селекторы(.cb, .acc). Можно заменить на .checkbox, .accordion;
  6. Не допускается вложение блочного элемента в строчный. Например, тега заголовка(h1-h6) в ссылку;

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by

Moving to a new branch

Unless there are other circumstances involved, this can be easily done by branching and rolling back.

git branch newbranch
git reset --hard HEAD~3 # Go back 3 commits. You *will* lose uncommitted work.*1
git checkout newbranch

Bittorrent uTorrent disable ads

Turn off ALL Ads/Featured Content/Bundle Crap in Utorrent/Bittorrent:

Options > Preferences > Advanced... Turn ALL settings to false:

  • bt.enable_pulse
  • distributed_share.enable
  • gui.show_notorrents_node
  • offers.left_rail_offer_enabled

#Fixing “WARNING: UNPROTECTED PRIVATE KEY FILE!” on Linux

If you are getting this error then you probably reset the permissions on your hidden .ssh directory in your user folder, and your keys aren’t going to work anymore. It’s very important that these files not be writable by just anybody with a login to the box, so openssh will give you an error if you try to use them.

The full error message:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@mrmlnc
mrmlnc / electron-api.md
Last active August 25, 2023 07:23
Electron API

Базовые возможности

process — это объект, позволяющий получить информацию о типе запущенного процесса (рендеринг или основной процесс), версию Chrome и Electron, а также путь до выполняемого js-файла.

Пользовательские элементы DOM:

Объект File — это абстракция над нативным File, передающая стандартному HTML5 file API путь к физическому расположению файла в файловой системе пользователя.

@learncodeacademy
learncodeacademy / pubsub.js
Created July 29, 2015 02:54
Basic Javascript PubSub Pattern
//events - a super-basic Javascript (publish subscribe) pattern
var events = {
events: {},
on: function (eventName, fn) {
this.events[eventName] = this.events[eventName] || [];
this.events[eventName].push(fn);
},
off: function(eventName, fn) {
if (this.events[eventName]) {
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 21, 2024 21:42
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@magicznyleszek
magicznyleszek / regex.md
Last active March 4, 2022 20:57
RegEx Cheatsheet
@Vestride
Vestride / encoding-video.md
Last active May 17, 2024 06:55
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus