<!-- 1px Transparent -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">
<!-- 1px Gray -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==">
<!-- 1px Black -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=">
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hasClass(element, className) { | |
return element.className && new RegExp("(^|\\s)" + className + "(\\s|$)").test(element.className); | |
} | |
var myDiv = document.getElementById('MyDiv'); | |
hasClass(myDiv, 'active'); | |
// OR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLS | |
locate 1, 30 : PRINT "Тест про компьютеры." | |
10 locate 2, 20 : PRINT "Начать? 1 да, 0 нет" | |
INPUT "", x | |
IF x = 0 THEN : END | |
IF x <> 1 THEN : GOTO 10 | |
y = 0 | |
PRINT "При ответе используйте соответствующую варианту цифру" | |
PRINT "без лишних символов и знаков" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# my KEYBOARD CONFIGURATION FILE by Alex33 | |
# Consult the keyboard(5) manual page. | |
XKBMODEL="pc105" | |
XKBLAYOUT="us,ru" | |
XKBVARIANT="," | |
XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll" | |
BACKSPACE="guess" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Любой скрипт любым скриптом. | |
/* я нашёл, из за touch. Ну почему так происходит, если данные уже обновлены? Сервер хранит старые копии для возможного отката? Хотя нет. Возможно, это просто кэш, основанный на дате изменения файла. Но все равно, где же тогда хранятся данные после уже изменение скрипта? */ | |
$f = "f.php"; | |
$time = @filemtime($f); | |
file_put_contents($f, "\n echo '".rand(111, 9999)."';", FILE_APPEND) or exit("error!"); | |
echo 'file updated. Changes will be applied in ~ 40 minutes. Check <a href="'.$f.'?'.uniqid().'">here</a>'; | |
@touch($f,$time,$time); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://www.shellhacks.com/ru/bash-test-if-file-exists/ | |
# https://habr.com/ru/company/ruvds/blog/325928/ | |
# http://qaru.site/questions/41427/how-to-check-if-a-file-contains-a-specific-string-using-bash | |
# http://blog.richim.org/2011/10/bash.html | |
# Check the script is being run by root | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import time, sys, os, os.path, re, sqlite3, json | |
from threading import Timer | |
om_th=None | |
## if sys.version_info.major == 2: | |
## print("REQUIRED PYTHON 3+") | |
## sys.exit(1) | |
if sys.argv[-1].lower() == "stop" and os.path.isfile("vkonline.pid"): (os.kill(int(open("vkonline.pid").read()), -9), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ru"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Генератор ссылок NVDAREMOTE</title> | |
<style> | |
// http://pauljadam.com/demos/title-keyboard.html | |
// edited | |
input[title]:focus:after { content:attr(title); | |
background-color: black; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// a simple key/val store using php & sqlite3 | |
// license: http://gist.github.com/375593 | |
// edited by alekssamos | |
/* Added multithreading: https://habr.com/ru/articles/204438/ */ | |
class SqliteStore { | |
protected $db; | |
public function __construct($tableName, $filePath = 'db.sqlite') { |
OlderNewer