Skip to content

Instantly share code, notes, and snippets.

View avdoshenkov's full-sized avatar

Dmitry Avdoshenkov avdoshenkov

View GitHub Profile

Гайд заполнения анкеты на загранпаспорт РФ 10 лет (биометрический) в Ереване/Гюмри в 2022 году

При помощи этих подсказок уже осуществлялись подачи на загранпаспорт в Гюмри и Ереване - все прошло успешно, работники консульства не задавали никаких вопросов.

Для подачи на загран алгоритм такой:

  • Ловим слот и записываемся в Ереван/Гюмри. Слоты появляются в начале каждого месяца (примерно 31-1ое число) для записи на следующий (в Гюмри более случайно, бывает и в середине месяца). Кроме того иногда люди отказываются от своих записей и они тоже становятся доступны.
  • За 2 рабочих дня звоним в консульство (после записи в слот придет письмо с телефоном) и подтверждаем визит.
@iamakulov
iamakulov / index.md
Created July 21, 2022 17:03
Proxying api.my-app.com under my-app.com/api, using CloudFront or Cloudflare

Here’s how to make api.my-app.com available under my-app.com/api, using CloudFront or Cloudflare.

CloudFront

If both my-app.com and api.my-app.com are hosted in AWS, you can route requests to these instances using the CloudFront CDN.

Here’s what you’ll need to do:

  1. Create a CloudFront distribution
const fetch = require("node-fetch")
const fetchAll = async function(urls, max=3) {
const results = Array(urls.length)
const workers = Array(max)
const index = {value:0}
for (let i=0; i<max; ++i) {
workers.push(fetchAll.worker(urls, results, index))
}
@topisani
topisani / gulpfile.js
Last active September 16, 2022 18:23
Gulp build script to build sass and upload to an ftp server. has a watch task.
// Web build script. Builds sass and uploads to an ftp server.
// Place source to be uploaded in a folder next to the script called src.
// Sass file is src/sass/style.scss and will become src/css/style.css
// will upload all files to the specified root
// Configuration for script
var config = {
host: 'example.com',
user: 'user',
password: 'fish123',
root: '/public_html'
@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o