Skip to content

Instantly share code, notes, and snippets.

View apalevich's full-sized avatar
🛰️
Working on new projects

Artem Palevich apalevich

🛰️
Working on new projects
View GitHub Profile
@apalevich
apalevich / 1-server.md
Created October 31, 2023 14:50
Веб-сервер на Ubuntu 20 с нуля: nginx, HTTPS, Brotli и HTTP/2 - fixed

Сервер

Подключает

ssh root@ip

Обновляет систему

@apalevich
apalevich / sahibinden.py
Created October 1, 2022 10:33
Send message to Whatsapp
import re
str = input('Copy and paste here phone number (Cep)')
fixed = re.sub(r"\D", "", str)
print('Send message to Whatsapp: https://wa.me/9' + fixed)
@apalevich
apalevich / Terms of reference.md
Last active May 12, 2022 16:49
Шаблон ТЗ

Rose_Lifetracker

Step 0. Customer Development — исследование рынка чтобы понимать будущего пользователя

Прототип в таблице

Step 1. ТЗ

  1. Цель проекта ("Разработать ... для ...")
  2. Описание ("Состоит из следующих функциональных блоков", список)
function checkOgImage(branch) {
window.open(document.querySelector('meta[property="og:image"]')
.attributes.content.value
.replace('www', branch + '.preview'), '_blank');
}
@apalevich
apalevich / bash
Last active February 9, 2021 21:19
Screenshots from videofile
Для Mac OS X
0) Делаешь папку на рабочем столе (например, WP)
1) Открываешь Terminal
2) Вводишь команду while :;do screencapture ~/Desktop/WP/$(date +%y%m%d%H%M%S).png;sleep 20;done
3) В sleep 20 можешь заменить интервал на любой другой (в секундах)
4) Нажимаешь (Enter), запускаешь видео на полный экран. Программа просто делает скриншоты, как ты понял
5) Когда видео кончится, в терминале надо нажать Ctrl+C (не Cmd!)
<script>
var values = {
'checkbox-love': false,
'checkbox-money': false,
'checkbox-family': false,
'checkbox-business': false,
'checkbox-luck': false,
'checkbox-power': false,
'checkbox-wiseness': false,
'checkbox-smartness': false,
<table style="table-layout: fixed;" width="615" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
[% IF anketa.LRR101.city == "МОСКВА" %]
<tr>
<td colspan="2"><a x-do-link-test="0" target="_blank" href="https://www.laredoute.ru/batimat?nc=3484&omniturecode=EMC00124866RU&utm_source=mail&utm_medium=assort&utm_campaign=20_OFF_0303">
<img src="https://cdn.laredoute.com/repository/sites/12/ru-RU/emailing/images/32_030320_01_2.jpg" alt="" width="615" height="579"></a>
</td>
</tr>
[% END %]
<tr>
<!-- webim button generation date: 2017-03-15 version: 8.16.11 -->
<script type="text/javascript">
var webimLocation = '';
if(window.location.hostname.indexOf('www.laredoute.ru') == -1) webimLocation = 'mobilnaya_versiya_sayta';
var tcdiv1 = document.createElement("id");
tcdiv1.id = "tc_divid_1";
tcdiv1.style.cssText = "position: fixed;right: 18px;bottom: 80px;color: transparent;font-size: 0;padding: 5px 0px 5px 10px; border-radius: 100%; z-index: 5;";
document.body.appendChild(tcdiv1);
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
@apalevich
apalevich / GetPontsNearby.ashx
Created February 6, 2020 15:32
GetPontsNearby.ashx
<%@ WebHandler Language="C#" Class="GetPointsNearby" %>
using System;
using System.Web;
using System.Web.Script.Serialization;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text.RegularExpressions;
public class GetPointsNearby : IHttpHandler