Skip to content

Instantly share code, notes, and snippets.

View ChugunovRoman's full-sized avatar
💭
I may be slow to respond.

Roman ChugunovRoman

💭
I may be slow to respond.
  • LAD IT
  • Kazakhstan, Aktobe
View GitHub Profile
@ChugunovRoman
ChugunovRoman / .gitlab-ci.yml
Created June 18, 2018 14:58
Deploy Electron app with gitlab ci
# https://<example.com>/<namespace>/<project>/-/jobs/artifacts/<tag>/download?job=pages
# https://<example.com>/<namespace>/<project>/-/jobs/artifacts/<tag>/raw/<path_to_file>?job=pages
# Where:
# example.com - domain name your gitlab server
# namespace - your name user on the gitlab
# project - your project
# tag - ref of current job.
# If job run on only by tags, than ref will be named as tag name
# If job run on only master, than ref will be named as "master", i.e.: https://<example.com>/<namespace>/<project>/-/jobs/artifacts/master/download?job=pages
# path_to_file - path to file relative from root workspace folder
@ChugunovRoman
ChugunovRoman / .bashrc
Last active January 6, 2024 10:04
Alias for npm run with auto completing a npm scripts from package.json from current directory.
alias nr="npm run"
_npm_scripts() {
# check package.json file in current directory
if [ ! -f ./package.json ]; then
return
fi
local scripts="$(node -e 'const { scripts } = require(`./package.json`); if (!scripts) process.exit(); let a = Object.entries(scripts); for (let s in scripts) { console.log(s); }' | grep -E ^$2)"
local -a toks
@ChugunovRoman
ChugunovRoman / ui_addon_azazel_faction_chooser.lua
Created February 10, 2021 08:40
ui_addon_azazel_faction_chooser.script
local inAlive = alife()
azazel_death = false
addon_azazel_menu = {}
class "addonAzazelFactionChooser"(CUIScriptWnd)
function addonAzazelFactionChooser:__init(mainmenuReference)
super()
self.mainmenuReference = mainmenuReference
@ChugunovRoman
ChugunovRoman / beh_hunter.ltx
Last active July 24, 2020 20:14
STALKER CoC. Логика НПС-охотников за ГГ
[logic]
active = beh@general
on_hit = hit
on_death = death
combat_ignore = combat_ignore
post_combat_time = 0,0
[beh@general]
combat_ignore = combat_ignore
combat_ignore_cond = {is_enemy_actor()} false, {-alert} always, false
@ChugunovRoman
ChugunovRoman / .bashrc
Last active October 26, 2018 17:47
Auto completion for alias
# load completion for git alias
_completion_loader git
__git_complete gb _git_branch
__git_complete gck _git_checkout
__git_complete gd _git_diff
__git_complete gc _git_commit
__git_complete gl _git_log
__git_complete ga _git_add
@ChugunovRoman
ChugunovRoman / combinations.js
Last active October 12, 2018 06:20
All possible combinations of elements in array
#! /usr/bin/node
const Readable = require('stream').Readable;
const stream = new Readable;
stream.on('data', chunk => {
console.log(JSON.parse(chunk.toString()));
});
@ChugunovRoman
ChugunovRoman / Gulpfile.js
Last active June 27, 2018 09:37
Gulp for make a C++ app (In develop still)
const fs = require('fs');
const path = require('path');
const cp = require('child_process');
const gulp = require('gulp'),
watch = require('gulp-watch');
if (process.env.PROJECT == "") {
console.error(`You need specified the PROJECT=<project_folder> env. This variable indicates to project dir, which need to build.`);
return;
@ChugunovRoman
ChugunovRoman / c_cpp_properties.json
Last active June 26, 2018 06:43
Configuration file for VSCode for integrate with C++ (In this case with Qt C++) (Need to install the C/C++ extension from Microsoft)
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${env.HOME}/Qt5.9.6/5.9.6/gcc_64/include/**",
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
@ChugunovRoman
ChugunovRoman / server.mjs
Created June 21, 2018 13:37
Express static server with Read/Write json file
/**
* Server side for issuance client scripts
*/
import path from "path";
import Express from 'express';
import BodyParser from "body-parser";
import { readFile, writeFile } from "./util";
@ChugunovRoman
ChugunovRoman / webpack.config.dev.js
Created June 21, 2018 12:08
Webpack config for TypeScript + React + DevServer + Hot Reload + Sass + AutoPrefixer
const webpack = require('webpack');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const { CheckerPlugin } = require('awesome-typescript-loader');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const prefixer = require('autoprefixer');
const path = require('path');
const rootFolder = process.cwd();