Skip to content

Instantly share code, notes, and snippets.

View elqsar's full-sized avatar

Boris Musatov elqsar

View GitHub Profile
@KRostyslav
KRostyslav / tsconfig.json
Last active June 23, 2024 17:44
tsconfig.json с комментариями.
// Файл "tsconfig.json":
// - устанавливает корневой каталог проекта TypeScript;
// - выполняет настройку параметров компиляции;
// - устанавливает файлы проекта.
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта.
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта.
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга.
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути.
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию.
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json".
@lenkavon
lenkavon / reactiveconf-2017-cfp-shared-logic-web-mobile.md
Last active November 21, 2017 10:00
Sharing code between web and mobile using React, ReactNative and Redux

This is the response to lightning talk CFP at ReactiveConf.

Sharing code between web and mobile using React + ReactNative + Redux

When you stand in front of the project that aims to come with mobile and web application, going for combo React.js & ReactNative is easy choice. But to decide how to handle the data flow is a different story.

My team made this decision and after couple of talks and earlier experience with graphQL + Relay, we went for Redux. Redux enabled us to share most of the bussines logic even though the apps differ in usecases. I would like to share the challenges we had to overcome with you.

@dmerrick
dmerrick / cleanup-ecr.rb
Last active August 23, 2020 14:04
Delete old ECR images
#!/usr/bin/env ruby
# this script will delete ECR images that are older than N days
require 'date'
require 'json'
# customize this script
repo = 'snapdocs'
delete_if_older_than = 60 # days
@CatTail
CatTail / htmlentity.js
Created November 30, 2012 08:27
Javascript: encode(decode) html text into html entity
// encode(decode) html text into html entity
var decodeHtmlEntity = function(str) {
return str.replace(/&#(\d+);/g, function(match, dec) {
return String.fromCharCode(dec);
});
};
var encodeHtmlEntity = function(str) {
var buf = [];
for (var i=str.length-1;i>=0;i--) {