Skip to content

Instantly share code, notes, and snippets.


Denis Evgrafov stereodenis

View GitHub Profile
stereodenis /
Created May 6, 2020 — forked from beatfactor/
Install Nginx on Mac OS from source (without brew)

Install Nginx on Mac OS from source

no Homebrew required

1. Download Nginx

$ cd /usr/local/src
$ curl -OL
$ tar -xvzf nginx-1.12.2.tar.gz && rm nginx-1.12.2.tar.gz
View gist:6d2985a61e29da040876ea7efb27d883
Категория ЕДВ
Герой Советского Союза
Герой Российской Федерации
Полный кавалер ордена Славы
Член семьи умершего (погибшего) Героя Советского Союза, Героя Российской Федерации или полного кавалера ордена Славы
Герой Социалистического Труда
Полный кавалер ордена Трудовой Славы
Герой Труда Российской Федерации
Инвалиды войны
View gist:50b5306ceb9a181191ed5370dfcbbd56
./gradlew assembleRelease
> Configure project :react-native-background-upload
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed soon. For more information see:
> Task :react-native-background-upload:compileReleaseJavaWithJavac FAILED
/Users/stereodenis/work/blablahome/node_modules/react-native-background-upload/android/src/main/java/com/vydia/ error: package does not exist
View gist:e7bda8e3b4a1d614c29b16349a5cf51f
bundle exec rake "parallel:test[2]"
2 processes for 522 tests, ~ 261 tests per process
Run options: --seed 22027
# Running:
.Run options: --seed 33667
# Running:
View gist:2cb7ae5f6689b99120f4d34b046727b4
pg_restore dtpmap.backup --clean -d dtpstat
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3342; 2606 1704345 FK CONSTRAINT dtpmapapp_updatelog dtpmapapp_updatelog_area_id_d5b25033_fk_dtpmapapp_region_id dtpmap
pg_restore: [archiver (db)] could not execute query: ERROR: relation "public.dtpmapapp_updatelog" does not exist
Command was: ALTER TABLE ONLY public.dtpmapapp_updatelog DROP CONSTRAINT dtpmapapp_updatelog_area_id_d5b25033_fk_dtpmapapp_region_id;
pg_restore: [archiver (db)] Error from TOC entry 3331; 2606 427116 FK CONSTRAINT dtpmapapp_region dtpmapapp_region_parent_region_id_8359e440_fk_dtpmapapp dtpmap
pg_restore: [archiver (db)] could not execute query: ERROR: relation "public.dtpmapapp_region" does not exist
Command was: ALTER TABLE ONLY public.dtpmapapp_region DROP CONSTRAINT dtpmapapp_region_parent_region_id_8359e440_fk_dtpmapapp;
View gist:4d6427d89d4c69d90bacc88671ad65d4
pip3 install django==2.1.5
Requirement already satisfied: django==2.1.5 in /usr/local/lib/python3.7/site-packages (2.1.5)
Requirement already satisfied: pytz in /usr/local/lib/python3.7/site-packages (from django==2.1.5) (2018.9)
@MacB ➜ dtp-stat rbenv:(2.3.1) git:(master) ✗ ./ makemigrations --noinput
Traceback (most recent call last):
File "./", line 17, in <module>
"Couldn't import Django. Are you sure it's installed and "
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
stereodenis / gist:760022a29df33e4455b8442ba0b65181
Last active Sep 27, 2017
Список проблем благоустройства
View gist:760022a29df33e4455b8442ba0b65181
Повреждение газона
Требуется озеленение
Сделать экопарковку
Сломанные деревья
Парковка на газоне
Парковка на тротуаре
Парковка на переходе
Нарушения в парках, скверах и дворах
View numberToCurrency
numberToCurrency = (number, unit) => {
var precision = 1
var delimiter = ' '
var separator = ','
// return '' if isNaN(number) or not number?
number = number.toFixed(~~precision)
var [i, f] = number.split('.')
var decimals = f > 0 ? separator + f : ''
return i.replace(/(\d)(?=(?:\d{3})+$)/g, '$1' + delimiter) + decimals + (unit || '')

Capybara Cheat Sheet

View the original gist:


visit "/projects"
visit post_comments_path(post)

Clicking Links and Buttons

stereodenis / bench
Last active Aug 29, 2015
View bench
# createdb bench
require 'pg'
require 'active_record'
require 'benchmark'
require 'benchmark/ips'
adapter: 'postgresql',
You can’t perform that action at this time.