Skip to content

Instantly share code, notes, and snippets.

View isuvorov's full-sized avatar
🎃
Программирую и предпринимаю

Igor Suvorov isuvorov

🎃
Программирую и предпринимаю
View GitHub Profile
@missingdays
missingdays / anagram.js
Last active January 21, 2016 11:24
Such anagram
function addLetters(s){
var letters = {};
for(var i = 0; i < s.length; i++){
var letter = s[i].toLowerCase();
if(letter != " "){
if(letters[letter]){
letters[letter] += 1;
} else {

Онбординг фронтендера на Амплифере

Дать доступ. Менеджер и Макс даёт доступ. Фронтовый тимлид пинает их, уточняет у нового фронтендера дали ли ему все доступы, пинаем ещё раз, если надо.

  1. Выдать почту на @amplifr.com
  2. Доступ в Slack
  3. Доступ в Trello
  4. Доступ в GitHub
  5. Доступ в Zeplin
  6. Доступ в Sentry

Принципы разработки Амплифера

Тут перечислены не законы, последние слово всегда за здравым смыслом. Тут перечислены лишь направление, куда надо стремиться. Принципы, которые должны помочь, когда не знаешь, что выбрать.

Ценности

  1. Пользователь. Если что-то сильно мешает UX или есть критическая ошибка, то в первую очередь мы спасаем пользователей. Для этого иногда надо взять ответственность на себя, переубедить толпу, написать плохой код.
@lexrus
lexrus / disable_all_animation.sh
Created August 1, 2014 06:05
Disable all animations of OS X.
# opening and closing windows and popovers
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# smooth scrolling
defaults write -g NSScrollAnimationEnabled -bool false
# showing and hiding sheets, resizing preference windows, zooming windows
# float 0 doesn't work
defaults write -g NSWindowResizeTime -float 0.001
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@RANUX
RANUX / комбинации-клавиш-bash.txt
Last active April 12, 2024 13:24
Комбинации клавиш для Bash
##### Перемещение курсора:
Ctrl + a — переход в начало строки
Ctrl + b — переход на 1 символ назад
Ctrl + c — посылает программе SIGINT. Обычно, прерывает текущее задание
Ctrl + d — удаляет символ под курсором (аналог delete)
Ctrl + e — переход к концу строки
Ctrl + f — переход на 1 символ вперёд
Ctrl + xx — переходит от текущей позиции курса в начало строки и обратно.
Ctrl + p — Предыдущая команда (Стрелка вверх)
@isuvorov
isuvorov / __dirname.js
Created April 18, 2024 05:09
ESM __dirname and __filename
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
export const getFilename = (meta) => fileURLToPath(meta.url);
export const getDirname = (meta) => dirname(getFilename(meta));
const __filename = getFilename(import.meta);
const __dirname = getDirname(import.meta);
@millermedeiros
millermedeiros / osx_setup.md
Last active May 7, 2024 08:01
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...

@cobyism
cobyism / gh-pages-deploy.md
Last active May 7, 2024 18:46
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).