Skip to content

Instantly share code, notes, and snippets.

@crutch12
crutch12 / README.md
Last active November 14, 2024 09:23
Ревью кода - Уник, хакатон, 10/2024
@crutch12
crutch12 / README.md
Last active June 16, 2024 09:53
download npm

Модули взяты из https://gist.github.com/anvaka/8e8fa57c7ee1350e3491

Выкачиваем top 6к npm модулей (@latest версии)

Предварительно выставляем в .npmrc

# заменяем MY_REGISTRY_URL и MY_REGISTRY_NPM

registry=https://MY_REGISTRY_URL/app/repo-ci-npm/api/repository/MY_REGISTRY_NPM/
// Быстрое создание учёток через freeipa
// Скрипт исполняется в браузере, после авторизации в freeipa
// const users = [
// {
// first_name: 'Данёк',
// last_name: 'Якубович',
// email: '[email protected]', // указываем email человека (можно пропустить, тогда будет без email)
// // пароль - генерируем отсюда https://www.random.org/passwords/?num=5&len=12&format=html&rnd=new
// password: 'MR132kKk9123123az5gnm',
@crutch12
crutch12 / README.md
Last active November 9, 2023 14:18
Offline mode (page dumps) for [email protected]

Offline mode (page dumps) for confluence-server

Confluence Server only. It will not work with Confluence Cloud

Supports all modern browsers.

Why

When you are editing page content in confluence it continuously saves data to server. But if you lost internet connection (for a long time) in the middle of the path and then closed your browser - you will lose all unsaved data.

@crutch12
crutch12 / recursive_tree.json
Created July 25, 2022 20:22
recursive tree data
{
"value": 1,
"children": [
{
"value": 2,
"children": [
{
"value": 5
},
{
@crutch12
crutch12 / README.md
Last active July 14, 2022 15:15
Smartgit ui config

Help - About Smartgit - Information - Setting Path (click) - Go to latest (eg. 21.2) - Copy/Paste .yml files from this gist - Done

@crutch12
crutch12 / AbilityContext.ts
Created May 13, 2022 13:42
Setup React Casl ability (src/components/ability)
import React from 'react';
import { defineAbilitiesFor } from '~/lib/ability';
export const AbilityContext = React.createContext(defineAbilitiesFor(null));
const execSync = require('child_process').execSync;
const fs = require('fs');
const webpack = require('webpack');
const marked = require('marked');
module.exports = (env, argv) => {
return {
plugins: [
// @NOTE: Generate CHANGELOG.md (from git log + current CHANGELOG.md), put it in bundle
env.NODE_ENV === 'production' && {