Skip to content

Instantly share code, notes, and snippets.

View lgg's full-sized avatar
👑
Trying to make the world a better place

Fedor lgg

👑
Trying to make the world a better place
View GitHub Profile
@lgg
lgg / run_letsencrypt
Created January 10, 2016 05:16
Let's encrypt auto authenticator runner for multiply domains
#!/bin/bash
#Vars
web_service='nginx'
config_path='/usr/local/letssl/'
le_path='/opt/letsencrypt'
exp_limit=20;
#Func
function check_ssl {
@lgg
lgg / js-function arguments-parse.js
Created November 29, 2019 18:35
JS Function arguments parsing visual explaination
//JS Function arguments parsing visual explaination
let i = {
p0: 0,
p1: 0,
p2: 0,
p3: 0,
pa: 0
};
@lgg
lgg / README.md
Created July 10, 2016 01:32 — forked from coolaj86/README.md
Let Google cache and resize your images
@lgg
lgg / clicker.js
Last active January 27, 2021 16:20
Своя игра online auto-clicker
clickerActivated = false;
function autoClicker(e) {
try {
if (e.currentTarget.children[0].classList.contains('tableBorder')) {
if (window.getComputedStyle(document.getElementById('table').children[0], null)['border-color'] === "rgb(255, 230, 130)") {
document.getElementById('playerButtonHost').children[0].click();
console.log('CLICKED')
@lgg
lgg / README.md
Last active March 16, 2021 16:50
mxnet compilation from source issue

Check this issue: apache/mxnet#19992


I can successfully compile from master branch, but it provides mxnet==2.0.0

Why

I want 1.8.x or 1.x mxnet version with CUDA 11.2 support

@lgg
lgg / README.md
Created June 25, 2021 00:39
mi home failed to initialize device (3) - How to fix

If you get the error "mi home failed to initialize device (3) " in your MiHome app (for me it was on iOS):

Steps to fix (hope one of this step will help you):

  • check if you have a connection to the Internet (try to open any page in the browser)
  • check if you have NO problems with available memory space on your device (for me deleting few apps and emptying ~250mb instead of 14mb helped to solve the issue)
  • try to reinstall the app
  • try to reboot the GateWay
  • check that the device is running (reset power on it = reboot)
  • try to ask for help on MiHome Forum
@lgg
lgg / README.md
Last active July 8, 2021 08:40
Велобайк штрафы за некорректную парковку или неверное завершение аренды

Велобайк

  • Что будет, если оставить/припарковать/завершить аренду обычного велосипеда на электростоянке / в электропорту / электропарковке?
  • Что будет, если оставить/припарковать/завершить аренду электровелосипеда / электробайка на обычной стоянке / в обычном порту?

Короткий ответ:

За это будет предположен штраф в размере 1 000 (одна тысячи) рублей, но его необязательно выпишут. Поступайте на свой страх и риск.

Полный ответ читайте ниже

@lgg
lgg / guide.md
Created August 4, 2021 15:48
Migrate WhatsApp chat history from Android to Apple Iphone (iOS)

Migrate WhatsApp chat history from Android to Apple Iphone (iOS)

TL;DR;

Actual for Summer 2021

  • Without using paid apps you can't migrate media files
  • To migrate media you need to buy some app (i can't recommend any, maybe someone will in the comments)

Usefull links

@lgg
lgg / README.md
Created January 6, 2022 03:00
Save SVG from HTML5 Canvas

Save SVG from Canvas

tags: Save/download/get/parse SVG image from HTML5 html web js javascript canvas

example websites: https://www.vectorizer.io/

Insert this code to JavaScript console:

var svgData = $("#outputsvg")[0].outerHTML;
var svgBlob = new Blob([svgData], {type:"image/svg+xml;charset=utf-8"});