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
{
"swagger": "2.0",
"info": {
"version": "3.0.0",
"title": "Gitlab issues api"
},
"host": "gitlab.com",
"basePath": "/api/v3",
"schemes": [
"http",
@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 / 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 / vk_music.js
Created October 24, 2017 23:31
node js load music from vk
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';
@lgg
lgg / index.php
Created October 30, 2017 20:11
[VK] Move photos from saved to another album
<?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 / index.js
Created January 30, 2018 00:30
create links list for opening
var links = [
];
var html ="";
for(var i =0; i< links.length; i++){
html += "<a href='" +links[i] + "'>" + links[i]+ "</a><br><br>";
}
@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:
@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);