Skip to content

Instantly share code, notes, and snippets.

View Niakr1s's full-sized avatar
Coding...

Niakr1s

Coding...
View GitHub Profile
@Niakr1s
Niakr1s / arch-i3gaps-install.md
Created May 17, 2024 10:13 — forked from fjpalacios/arch-i3gaps-install.md
Arch + i3-gaps Install Guide

Arch + i3-gaps Install Guide

First set up your keyboard layout. For example, in Spanish:

   # loadkeys es

For a list of all acceptable keymaps:

   # localectl list-keymaps
@Niakr1s
Niakr1s / pkglist.txt
Last active March 21, 2021 07:34
pkglist
accountsservice
acpi
acpid
alsa-firmware
alsa-plugins
alsa-utils
antigen
apparmor
arandr
artwork-i3
@Niakr1s
Niakr1s / hscards.json
Created February 27, 2021 14:24 — forked from Rapptz/hscards.json
Hearthstone Cards
[
{
"id": 7,
"name": "Garrosh Hellscream",
"description": "",
"image": "http:\/\/wow.zamimg.com\/images\/hearthstone\/cards\/enus\/medium\/HERO_01.png",
"class": "warrior",
"type": "hero",
"quality": "free",
"race": "none",
@Niakr1s
Niakr1s / start.sh
Last active February 13, 2021 11:25
systemd service node nvm example
#!/bin/bash
. /home/nea/.nvm/nvm.sh
npm run run
interface Person {
name: string;
surname: string;
}
type StringKeys<T> = string & keyof T;
type KeyChangedCallback<T> = (key: StringKeys<T>, obj: T) => void;
type UnsubscribeFn = () => void;
type KeyChangeObservable<T> = T & { onKeyChanged: (keyName: StringKeys<T>, cb: KeyChangedCallback<T>) => UnsubscribeFn }
import { IsString, validateOrReject } from 'class-validator'
interface ICommandPackage {
kind: 'commandPackage'
command: string
}
interface IMessagePackage {
kind: 'messagePackage'
message: string
type Class<Instance extends any> = (new (...args: any[]) => Instance) & { [key: string]: any }
function MySingleton() {
return function decorator<Instance extends any>(constructor: Class<Instance>) {
let instance: Instance | null = null
let decoratedConstructor = function (...args: any[]) {
if (!instance) {
instance = new constructor(...args)
}
@Niakr1s
Niakr1s / awesome.md
Last active February 25, 2021 13:06
Awesome npm packages

Async iter

  • p-map: Асинхронное итерирование по коллекции с лимитом количества одновременных задач.
  • p-limit: Примерно то же самое, что и p-map, но с другим синтаксисом.

Streams

  • parallel-transform: Параллельный Ordered/Unordered Transform stream с лимитом.
  • pumpify: Кобминирование стримов.
  • multistream: Последовательный merge стримов.
@Niakr1s
Niakr1s / cmake_windows_icon.txt
Created November 23, 2019 19:55
How to add icon to cmake app in windows
1. Put app.ico in directory.
2. Create app.rc in same directory with one line:
IDI_ICON1 ICON DISCARDABLE "app.ico"
3. Run command (Warning: it's app.o, not app.res, how it is mentioned in other manuals!)
windres app.rc -o app.o
4. add_executable(app
...