Skip to content

Instantly share code, notes, and snippets.

// vue ingect
export function injectFavorites(): void {
const els: NodeListOf<Element> = document.querySelectorAll('.product-card__favorite-section');
if (els) {
/* tslint:disable */
for (const i in els) {
const el: Element = els[i];
if (el && el instanceof HTMLElement) {
var player = document.querySelector('video');
var options = {
start:0,
end: 10000000,
}
player.addEventListener('timeupdate', (e)=>{
if(player.currentTime > options.end){
player.currentTime = options.start;
}
if(Math.round(player.currentTime) % 5 === 0){
@teimur8
teimur8 / baskup_table.sh
Created December 31, 2019 03:35
mysql dump by table
#!/bin/bash
# user pass database "" "table1" только table1
# user pass database "table1 table2" все кроме table1 table2
USER=$1
PASSWORD=$2
DATABASE=$3
EXCLUDE=$4
ONLY=$5
@teimur8
teimur8 / User.php
Created December 27, 2019 08:50 — forked from Ocramius/User.php
Doctrine 2 ManyToMany - the correct way
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User
content=$(wget google.com -q -O -)
echo $content
content=$(curl -L google.com)
echo $content
content=$(wget google.com -q -O -)
echo $content
content=$(curl -L google.com)
echo $content
zfs create tank1/test-tom
# https://www.8host.com/blog/zashhita-ssh-s-pomoshhyu-fail2ban-centos-6/
[DEFAULT]
ignoreip = 127.0.0.1
bantime = 3600
findtime = 600
maxretry = 3
[ssh-iptables]
enabled = true
filter = sshd
# http://dreamhelg.ru/2010/02/15-regular-expression-for-web-developers/
foo Строка “foo”
^foo Строка начинается с “foo”
foo$ Строка заканчивается на “foo”
^foo$ «foo» встречается в строке только один раз
[abc] a, b, или c
[a-z] любой символ в нижнем регистре
[^A-Z] любой символ, не находящийся в верхнем регистре
(gif|jpg) Означает как «gif” так и “jpeg”
[a-z]+ Один или более символов нижнего регистра
<?php
class Proxy
{
/**
* Ссылка на файл с обновляемым списком бесплатных прокси
*/
const PROXY_FILE_DOWNLOAD_URL = 'https://raw.githubusercontent.com/clarketm/proxy-list/master/proxy-list.txt';
/**