Skip to content

Instantly share code, notes, and snippets.

🏠
аааа

jgfhkjtdyj zhepa

View GitHub Profile
View gist:8db7ef7fc1bc4b17777eebfc3c8fadc7
const mysql = require('mysql2/promise');
(async function () {
const connection = await mysql.createConnection({
host: 'localhost',
port: 3306,
user: 'root',
password: 'my-secret-pw',
database: '1win'
});
View .yml
version: "3"
services:
nginx:
image: nginx:latest
volumes:
- ./mysite.template:/etc/nginx/conf.d/mysite.template
ports:
- "80:80"
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/mysite.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
View Events.ts
enum ServerEvents {
Scroll = "scroll"
}
enum ClientEvents {
Otsos = "rustSoset"
}
export const type Events = ServerEvents | ClientEvents;
@zhepa
zhepa / silence.js
Last active Mar 28, 2019
игнор ёбаный
View silence.js
const request = require("request-promise");
const iconv = require("iconv");
const THRESHOLD = 36000;
const USERID = 1;
let previousMessageTime;
let graphItems = [];
@zhepa
zhepa / loader.mjs
Created Feb 22, 2019
ESM Loader root path import resolve alias
View loader.mjs
import path from 'path';
import os from 'os';
const isWindows = os.platform() === 'win32';
const ROOT_PATH = path.join(process.cwd(), 'app/');
export function resolve(specifier, parentModuleURL, defaultResolver) {
if (isWindows && /^@\//.test(specifier)) {
View script.js
var prevChatHeight = "";
USEROPTS.modhat = true;
document.getElementById("chatline").setAttribute("placeholder", "Напишите сообщение..");
document.querySelectorAll("input.form-control").forEach(function(e) {
e.setAttribute("style", "background-color: #2b2b2b !important")
});
$("#videocontrols").append('<button class="btn btn-sm btn-default" id="toggleCinemaMode" title="Режим кинотеатра">Режим кинотеатра</button>');
View css.css
@import url("https://fonts.googleapis.com/css?family=Roboto:400,500,700&subset=cyrillic");
#wrap {
font-family: "Roboto", sans-serif;
background: #2b2b2b;
}
.queue_temp .btn-group .glyphicon, #modflair, #footer {
display: none;
}
View a.css
#footer1 {
display: none;
}
@zhepa
zhepa / previews.js
Created Aug 8, 2018
превьюхи
View previews.js
const Sharp = require('sharp');
const Vibrant = require('node-vibrant');
const fs = require('fs');
const inputImage = process.argv[2];
const blur = process.argv[3] ? process.argv[3] : 20; // 20
const size = 380; // 412
const source = inputImage || 'DM9VEJgW4AUmLX.png';
@zhepa
zhepa / VK album Download.js
Last active Jul 22, 2018
Скачать альбом ВКонтакте бесплатно
View VK album Download.js
const fs = require('fs');
const https = require('https');
const settings = {
albumId: 123,
token: 'сосать жопу'
};
https.get(`https://api.vk.com/method/photos.get?photo_sizes=1&album_id=${settings.albumId}&access_token=${settings.token}&v=5.70`, res => {
You can’t perform that action at this time.