Skip to content

Instantly share code, notes, and snippets.

View alexgalkin's full-sized avatar

Alex Halkin alexgalkin

View GitHub Profile
@alexgalkin
alexgalkin / c.md
Created January 22, 2016 18:29 — forked from SerafimArts/tips.md
  • На iOS устройствах числовые значения подчёркиваются синим. Эта проблема возникает из-за того, что iOS устройства по умолчанию считают все числа похожие на телефонные номера - телефонными номерами. Решается добавлением <meta name="format-detection" content="telephone=no" /> Тоже самое касается адреса: <meta name="format-detection" content="address=no" />

  • Пользователь может уменьшать и увеличивать приложение. Решается добавляением тега <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />

  • Ссылки нажимаются с задержкой (примерно 300ms). Решается подпиской на событие touchstart и принудительной инициализацией события click после него. Если проблема всё равно возникает - ничего не поделать, надо облегчать dom.

  • В android появляется синяя обводка вокруг ссылок с характерным звуком. Решение:

@alexgalkin
alexgalkin / rus-filenames-utf8-fix.md
Last active December 21, 2016 15:02
Fix UTF-8 encoding for couple special russian letters
@alexgalkin
alexgalkin / logstash_db_report_csv.conf
Last active January 13, 2017 20:12
Logstash config for parsing DB CSV reports
input {
file {
path => "/var/logs/csv/*.csv"
type => "csvdb"
start_position => "beginning"
}
}
filter {
if [message] =~ /^oid/ {
@alexgalkin
alexgalkin / haroopad_install.txt
Created February 3, 2017 10:06
haroopad install
change package.json
{
"name": "haroopad",
"version": "0.3.3",
"description": "Markdown Editor",
"main": "",
"homepage": "https://rhiokim.github.com/haroopad",
"repository": "git://github.com/rhiokim/haroopad.git",
"author": "[email protected]",

Docker for mail

mkdir -p config touch config/postfix-accounts.cf docker run --rm
-e MAIL_USER=[email protected]
-e MAIL_PASS=password1
-ti tvial/docker-mailserver:latest
/bin/sh -c 'echo "$MAIL_USER|$(doveadm pw -s SHA512-CRYPT -u $MAIL_USER -p $MAIL_PASS)"' >> config/postfix-accounts.cf

@alexgalkin
alexgalkin / sublime-tips.txt
Last active April 17, 2018 22:46
Sublime Tips
RegExpt for getting String before the first comma
^([^,])+
... alternative approach (option with selecting all possible characters)
^[a-zA-Z0-9\s\-\(\)\_\<\>]+
... and before the first space
^([^\s])+
Regexp for removing blank lines
@alexgalkin
alexgalkin / node_healthy
Created February 4, 2019 10:30
Simple Node respone
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'application/json'});
res.write('{"healthy":true}');
res.end();
}).listen(3000);
uglifyjs --compress --mangle toplevel=true -- bin/index.js
@alexgalkin
alexgalkin / gist:1b7f460f35b94b72c4d6f4215ab7b77f
Last active May 14, 2024 20:44
Git Export project to ZIP
git archive --format zip --output /tmp/dev-project.zip main
@alexgalkin
alexgalkin / os_checkjs
Last active May 14, 2024 20:43
Node Check that it is not macOS
os.platform() !== "darwin"
// OR
process.platform !== 'darwin'