Skip to content

Instantly share code, notes, and snippets.

View alexstep's full-sized avatar

kellas alexstep

View GitHub Profile
@alexstep
alexstep / docker-compose.yml
Last active April 20, 2021 20:26
Docker compose for localizer.dev service
services:
mongodb:
image: mongo:latest
container_name: localizer_mongo
volumes:
- ./DATA/mongo-volumes:/data/db
backend:
image: alexstep/localizer-backend
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/5.0.4/mocha.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/5.0.4/mocha.js"></script>
<script>
mocha.setup('bdd');
</script>
@alexstep
alexstep / gist:09538947a6de15645078ab0036755c37
Created June 24, 2019 11:44
/etc/nginx/sites-enabled/mysite.conf
server {
server_name domainname.com;
listen 80;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
add_header Referrer-Policy "no-referrer-when-downgrade";
// https://moment.github.io/luxon/docs/manual/math.html#time-math
const { DateTime } = require('luxon')
const myRoundDates = function (birthday_str){
const typesArr = {'years':'лет','months':'месяцев','weeks':'недель','days':'дней'}
const roundDates = {}
// Округление до ближайшего большего круглого значения
// в соответствии с разрядом числа
0x0B5A5c67d302645A7781797faF1bc78361c9D4a8
@alexstep
alexstep / riot.tag
Last active April 17, 2017 08:44
riot.tag
<stat>
<script>
this.on('mount', ()=>{
})
</script>
<stat>
</stat>
@alexstep
alexstep / pre-commit
Last active October 6, 2015 11:34
precommit validation js(jshint) php debug functions
#!/bin/sh
#
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@alexstep
alexstep / gist:5e3d4566c5b14b8e5352
Last active August 29, 2015 14:06
intall XBMC+addons p2pproxy vlc mono
#!/bin/bash
clear
echo ''
echo ''
echo ' !!! ВНИМАНИЕ !!! '
echo ' Ознакомьтесь с инструкцией http://habrahabr.ru/post/235523/'
echo ''
echo ' Всё что вы делаете вы делаете на свой страх и риск'
echo ''
echo 'Нажмити Enter для продолжения'
@alexstep
alexstep / bx_search.php
Created November 12, 2012 21:33
bitrix search page
<?$APPLICATION->IncludeComponent("bitrix:search.page", "", array(
"RESTART" => "N",
"NO_WORD_LOGIC" => "N",
"CHECK_DATES" => "N",
"USE_TITLE_RANK" => "N",
"DEFAULT_SORT" => "rank",
"FILTER_NAME" => "",
"arrFILTER" => array(
0 => "no",
),
@alexstep
alexstep / bx_inc_area
Created November 12, 2012 19:37
bitrix include area
<?$APPLICATION->IncludeFile(
$APPLICATION->GetTemplatePath("include_areas/filename.php"),
Array(),
Array(
"MODE"=>"text"
//"MODE"=>"html"
//"MODE"=>"php"
)
);?>