Skip to content

Instantly share code, notes, and snippets.

View FullZero5's full-sized avatar
🏠
Working from home

@FullZero FullZero5

🏠
Working from home
View GitHub Profile
@FullZero5
FullZero5 / url.json
Created October 23, 2023 07:28
file
[
{
"title": "Россия 1 HD",
"file": "https://okkotv-live.cdnvideo.ru/channel/Russia1HD.m3u8",
"id": 3,
"group": "Эфирные"
},
{
"title": "Пятый канал",
"file": "https://okkotv-live.cdnvideo.ru/channel/5_OTT/480p.m3u8",
@FullZero5
FullZero5 / raketa_api.php
Created April 3, 2018 19:02 — forked from kolyaraketa/raketa_api.php
TELEGRAM API: sendDocument to telegram for website form
<form enctype="multipart/form-data" method="post">
<b>Файл для отправки:</b>
<input type="file" name="document">
<input type="hidden" name="MAX_FILE_SIZE" value="50000000" />
<input type="submit" value="Отправить">
</form>
<?php //Send file Telegram
$caption = "Caption for file";
$url = "https://api.telegram.org/botToken/sendDocument";
@FullZero5
FullZero5 / z.md
Last active May 16, 2021 21:35
Zabbix

docker-compose stop docker-compose up -d

docker stop $(docker ps -a -q)

@FullZero5
FullZero5 / index.js
Created September 7, 2020 08:43 — forked from rgabaydullov/index.js
Vue error handling example
/* учитывайте, что глобальный метод window.onerror
не будет ловить исключения без Vue.config.errorHandler */
Vue.config.errorHandler = (error, vm, info) => {
return middlewareErrorHandler(error, info);
}
// сюда попадут все ошибки, которые находятся за пределами исполнения Vue
window.onerror = (
message,
@FullZero5
FullZero5 / index.js
Created September 7, 2020 08:43 — forked from rgabaydullov/index.js
VanillaJS error handling example
/* middleware может принимать любое количество аргументов любых типов */
const middleware = (...args) => {
const [event, ...data] = args;
if (event.error) {
/* поймали объект экземпляр Error */
return event.error;
}
#!/bin/sh
branch=$1
if [ ! -z "$1" ]
then
git branch -D $branch
git push -d origin $branch
else
echo "Branch name is not specified"
@FullZero5
FullZero5 / ajax.js
Created February 7, 2020 05:57
js form
function send(e,form) {
fetch(form.action,{method:'post', body: new FormData(form)});
console.log('We send post asynchronously (AJAX)');
e.preventDefault();
}
/*<form method="POST" action="myapi/send" onsubmit="send(event,this)">
<input hidden name="crsfToken" value="a1e24s1">
<input name="email" value="a@b.com">
@FullZero5
FullZero5 / objtocss.js
Last active July 12, 2019 11:52
objtocss
const o2s = (o, className) => {
let elm = new Option();
Object.keys(o).forEach(a => (elm.style)[a] = o[a]);
return `.${className}{\n${elm.getAttribute("style")}\n}`;
}
const obj = {
visibility: "visible",
position: "fixed",
background: "transparent",
@FullZero5
FullZero5 / upgrade.sh
Created September 2, 2018 08:58 — forked from artemsky/upgrade.sh
PHP 7.2 Cloud9
sudo apt-get install python-software-properties -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
sudo apt-get install php7.2 php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml
sudo apt-get install libapache2-mod-php7.2 -y
sudo a2dismod php5
sudo a2enmod php7.2
sudo service apache2 restart
@FullZero5
FullZero5 / index.pug
Created August 15, 2018 09:50
Simple Profile Cards
#profiles.profile-cards