Skip to content

Instantly share code, notes, and snippets.

View crutch12's full-sized avatar
💭
🐸

Konstantin Barabanov crutch12

💭
🐸
  • Moscow, Russian Federation
View GitHub Profile
@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: 'dtestov@example.com', // указываем 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 confluence-server@7.5.0

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' && {
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://some/awesome/schema">
<xs:element name="REQUEST">
<xs:complexType>
<xs:sequence>
<xs:element name="LOGIN">
<xs:complexType>
<xs:choice>
<xs:element name="API_TOKEN">
<xs:annotation>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://tempuri.org/PurchaseOrderSchema.xsd"
targetNamespace="http://tempuri.org/PurchaseOrderSchema.xsd"
elementFormDefault="qualified">
<xsd:element name="PurchaseOrder" type="tns:PurchaseOrderType"/>
<xsd:complexType name="PurchaseOrderType">
<xsd:sequence>
<xsd:element name="ShipTo" type="tns:USAddress" maxOccurs="2"/>
<xsd:element name="BillTo" type="tns:USAddress"/>
</xsd:sequence>