Skip to content

Instantly share code, notes, and snippets.

👑
<script>alert('pwned');</script>

Fyodor lgg

👑
<script>alert('pwned');</script>
Block or report user

Report or block lgg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lgg
lgg / readme.md
Last active Nov 13, 2019
Keepass file format explained
View readme.md

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.

@lgg
lgg / run_letsencrypt
Created Jan 10, 2016
Let's encrypt auto authenticator runner for multiply domains
View run_letsencrypt
#!/bin/bash
#Vars
web_service='nginx'
config_path='/usr/local/letssl/'
le_path='/opt/letsencrypt'
exp_limit=20;
#Func
function check_ssl {
@lgg
lgg / Make WordPress to use protocol relative urls
Created Jun 7, 2016
Make WordPress to use protocol relative urls
View 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 / Google account settings.ru.md
Last active Feb 11, 2019
Ссылки для настройки google аккаунта
View Google account settings.ru.md
  1. Возраст, пол, интересы. Эти данные используются для показа релевантных объявлений. Вы можете просмотреть эту информацию здесь:

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

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

https://maps.google.com/locationhistory

  1. Ваша история поиска в Google:
@lgg
lgg / README.md
Last active Jan 23, 2019
Telegram save all media from chat/user/channel
View README.md

Quick tip. It is possible to download media with small python script.

Goto https://my.telegram.org and generate api id and api hash Install Telethon library with pip3 install telethon Run saveAllMedia.py (replace api_id, api_hash and username with your values).

If you need proxy install https://github.com/Anorov/PySocks pip install PySocks

This code downloads all media from the dialog with username user/chat/channel in current directory.

@lgg
lgg / remove_MS_telemetry.cmd
Created Mar 7, 2016 — forked from tarampampam/remove_MS_telemetry.cmd
Remove Windows 7/8/8.1 telemetry
View remove_MS_telemetry.cmd
@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 / index.js
Created Jan 30, 2018
create links list for opening
View index.js
var links = [
];
var html ="";
for(var i =0; i< links.length; i++){
html += "<a href='" +links[i] + "'>" + links[i]+ "</a><br><br>";
}
@lgg
lgg / index.php
Created Oct 30, 2017
[VK] Move photos from saved to another album
View index.php
<?php
/*
1. git clone https://github.com/fdcore/vk.api
2. mv vk.api/src/vk.php ./vk.php
3. edit file index.php below
*/
include __DIR__ . '/vk.php';
$user_id = 1; //YOUR VK USER ID
@lgg
lgg / vk_music.js
Created Oct 24, 2017
node js load music from vk
View vk_music.js
var querystring = require('querystring');
var https = require('https');
var iconv = require('iconv-lite');
const readline = require('readline-sync');
var my_id = parseInt(readline.question("Enter your ID: "));
var COOKIE = readline.question("Enter your cookies: ");
var USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36';
You can’t perform that action at this time.