Skip to content

Instantly share code, notes, and snippets.

View kjkasi's full-sized avatar
🎯
Focusing

kjkasi

🎯
Focusing
View GitHub Profile
docker pull registry.altlinux.org/alt/alt
docker run -it --rm registry.altlinux.org/alt/alt bash
apt-get update
apt-get install grafana
./usr/bin/grafana-server -config /etc/grafana/grafana.ini -homepath /usr/share/grafana/
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/python/2023.5.10831011/vspackage
@kjkasi
kjkasi / select.sql
Last active November 23, 2022 18:29
select Product and Category
if object_id('dbo.DETAIL') is not null
drop table dbo.DETAIL
go
if object_id('dbo.PRODUCT') is not null
drop table dbo.PRODUCT
go
if object_id('dbo.CATEGORY') is not null
drop table dbo.CATEGORY
@kjkasi
kjkasi / website-dl.md
Created November 15, 2022 17:28 — forked from stvhwrd/website-dl.md
Download an entire website for offline use with wget. Internal inks will be corrected so that the entire downloaded site will work as it did online.

The best way to download a website for offline use, using wget

There are two ways - the first way is just one command run plainly in front of you; the second one runs in the background and in a different instance so you can get out of your ssh session and it will continue.

First make a folder to download the websites to and begin your downloading: (note if downloading www.SOME_WEBSITE.com, you will get a folder like this: /websitedl/www.SOME_WEBSITE.com/)


STEP 1:

1. выпускаем свой SSL сертификат
openssl req -x509 -out host.docker.internal.crt -keyout host.docker.internal.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=host.docker.internal' -extensions EXT -config <( \
printf "[dn]\nCN=host.docker.internal\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:host.docker.internal\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
2. Чтобы конвертировать в PFX-файл, используйте следующую команду
openssl pkcs12 -export -out host.docker.internal.pfx -inkey host.docker.internal.key -in host.docker.internal.crt
3. Копируем сертификат по адресу
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
mode: 'development',
entry: './src/index.js',
devtool: 'inline-source-map',
devServer: {
contentBase: './dist',
@kjkasi
kjkasi / gist:fe987b5f65a6d886b6fe3f84ba627aa4
Created October 6, 2019 11:29
Список глобальныйх пакетов
npm list -g --depth 0

Deploy a Express.js project on Heroku

Step by step from command line by Michael Hsu

Quick start

Create a Node.js web framework 'express'

$ express myfirstexpress && cd myfirstexpress

Declare dependencies with NPM /package.json

SELECT * ,
DATE_ADD(
birthday,
INTERVAL IF(DAYOFYEAR(birthday) >= DAYOFYEAR(CURDATE()),
YEAR(CURDATE())-YEAR(birthday),
YEAR(CURDATE())-YEAR(birthday)+1
) YEAR
) AS `next_birthday`
FROM `users`
WHERE
This macro for checking block nullability before executing them:
#define BLOCK_EXEC(block, ...) if (block) { block(__VA_ARGS__); };
Moves from this:
if (completionBlock)
{
completionBlock(arg1, arg2);
}
to: