Skip to content

Instantly share code, notes, and snippets.

View vmrfriz's full-sized avatar
:octocat:

Valeriy Grechukha vmrfriz

:octocat:
View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active July 22, 2024 08:58
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@AlexxIT
AlexxIT / yandex_station_status.yaml
Created September 14, 2020 07:56
Отображаем статус Яндекс Станции с помощью умных ламп
yandex_station:
username: myuser
password: mypass
sensor:
- platform: template
sensors:
alice_state:
value_template: "{{ state_attr('media_player.yandex_station_mini', 'alice_state') }}"
@wanggang316
wanggang316 / dante_setup.sh
Created July 10, 2019 16:41 — forked from gpchelkin/dante_setup.sh
How To Setup SOCKS5 Proxy Server for (not only) Telegram using Dante on Ubuntu 16.04 / 18.04
### NOT A SCRIPT, JUST A REFERENCE!
# install dante-server
sudo apt update
sudo apt install dante-server
# or download latest dante-server deb for Ubuntu, works for 16.04 and 18.04:
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/dante/dante-server_1.4.2+dfsg-2build1_amd64.deb
# or older version:
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
@joseluisq
joseluisq / README.md
Last active May 15, 2024 19:12
Install PHP 7 Xdebug in Arch Linux

Install PHP 7 Xdebug in Arch Linux

"Normally", these instructions should be also valid (in similar way) for other Linux distros.

1.- Install Xdebug using pacman:

sudo pacman -Sy xdebug
@iba-cmsteam
iba-cmsteam / curdate.modx
Created February 20, 2017 08:43
ModX. current date without snippet
[[!+nowdate:default=`now`:strtotime:date=`%Y`]]
[
{ "keys": ["e", "u"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
{ "keys": ["c"], "command": "enter_insert_mode",
@gromdron
gromdron / bx_login.php
Last active July 11, 2024 08:28 — forked from belukov/bx_login.php
bitrix авторизация под админом без проверки агентов, статистики и для битрикс24
<?php
define('EXTRANET_NO_REDIRECT', true);
define('LDAP_NO_PORT_REDIRECTION', true);
define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
define("SM_SAFE_MODE", true);
define("NO_AGENT_CHECK", true);
define("NO_AGENT_STATISTIC", true);
define("STOP_STATISTICS", true);
include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
@mehdichaouch
mehdichaouch / memory_usage.php
Last active April 11, 2024 15:55
PHP Snippet to get human readable memory usage
<?php
function convert($size)
{
$unit=array('b','kb','mb','gb','tb','pb');
return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];
}
convert(memory_get_usage());
@jimdi
jimdi / rep-user-tg
Created February 25, 2016 00:05
Per-user Telegram Link mapping
Windows Registry Editor Version 5.00
; Per-user Telegram Link mapping
[HKEY_CURRENT_USER\Software\Classes\tg]
@="URL:Telegram Link"
"URL Protocol"="D:\\Prog\\Telegram Desktop\\Telegram.exe"
[HKEY_CURRENT_USER\Software\Classes\tg\DefaultIcon]
@="D:\\Prog\\Telegram Desktop\\Telegram.exe,1"
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active July 22, 2024 07:23
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4