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 / remove_MS_telemetry.cmd
Created March 7, 2016 14:23
Remove Windows 7/8/8.1 telemetry
@echo off
title "Disable Windows 7/8/8.1 Telemetry"
endlocal & setlocal EnableDelayedExpansion
rem Script created by <github.com/tarampampam> # 2015
rem Github: <https://gist.github.com/tarampampam/a0db45fb0de5976300b1>
rem OS: Windows 7/8/8.1
rem Version 0.2.14
echo.
@lgg
lgg / Google account settings.ru.md
Last active February 11, 2019 21:43
Ссылки для настройки google аккаунта
  1. Возраст, пол, интересы. Эти данные используются для показа релевантных объявлений. Вы можете просмотреть эту информацию здесь:

https://www.google.com/ads/preferences/

  1. История ваших перемещений:

https://maps.google.com/locationhistory

  1. Ваша история поиска в Google:
{
"swagger": "2.0",
"info": {
"version": "3.0.0",
"title": "Gitlab issues api"
},
"host": "gitlab.com",
"basePath": "/api/v3",
"schemes": [
"http",
@lgg
lgg / Make WordPress to use protocol relative urls
Created June 7, 2016 03:29
Make WordPress to use protocol relative urls
//make other links relative
add_filter ('site_url', 'wp_make_theme_links_protocols_relative');
add_filter ('get_option_siteurl', 'wp_make_theme_links_protocols_relative');
add_filter ('stylesheet_directory_uri', 'wp_make_theme_links_protocols_relative');
add_filter ('template_directory_uri', 'wp_make_theme_links_protocols_relative');
add_filter ('wp_get_attachment_url', 'wp_make_theme_links_protocols_relative');
add_filter ('wp_get_attachment_thumb_url', 'wp_make_theme_links_protocols_relative');
add_filter ('the_permalink', 'wp_make_theme_links_protocols_relative');
function wp_make_theme_links_protocols_relative( $link ){
$link = str_replace("http://", "//", $link);
@lgg
lgg / index.html
Last active June 11, 2016 22:45
caesar cipher in js
Исходное сообщение:
<br /><input type='text' id='message'>
<br /><br />
Сдвиг (число):<input type='text' id='shift' value='3'>
<br /><br />
<button onclick='encrypt()'>Зашифровать</button>
<br /><br />
<button onclick='decrypt()'>Расшифровать</button>
<br /><br />
Зашифрованное сообщение: <br />
@lgg
lgg / README.md
Created July 10, 2016 01:32 — forked from coolaj86/README.md
Let Google cache and resize your images
@lgg
lgg / hosts
Created August 5, 2016 13:45
etc/hosts
#Adobe:
127.0.0.1 3dns.adobe.com
127.0.0.1 activate.adobe.com
127.0.0.1 adobe-dns.adobe.com
127.0.0.1 adobeereg.com
127.0.0.1 ereg.adobe.com
127.0.0.1 practivate.adobe.com
127.0.0.1 192.150.14.69
127.0.0.1 192.150.18.101
127.0.0.1 192.150.18.108
@lgg
lgg / js.js
Created September 5, 2016 20:44
МРКО генератор дат
// noprotect
//выводит столбец дат для
//уроков для планирования МРКО
window.onload = function () {
var el = document.getElementById('wrap');
//даты первых уроков
//в формате месяц-день-год
var dates = [
@lgg
lgg / readme.md
Last active April 8, 2024 19:54
Keepass file format explained

Keepass file format explained

I’m currently working (I’m just at the beginning, and I’m quite slow) on a personal project that will use Keepass files (kdb and kdbx).
I tried to find some documentation about .kdb and .kdbx format, but I didn’t find anything, even in the Keepass official website. I you want to know how these file formats are structured, you must read Keepass’s source code. So I wrote this article that explains how Keepass file format are structured, maybe it will help someone.