Skip to content

Instantly share code, notes, and snippets.

View Mati365's full-sized avatar
🚧
Work Work Work

Mateusz Bagiński Mati365

🚧
Work Work Work
View GitHub Profile
@Mati365
Mati365 / setup.md
Created November 24, 2024 09:41 — forked from bhouse/setup.md
YubiKey GPG + GitHub setup

Yubikey + GPG + Github + Keybase

The following guide are steps that can be used to generate GPG keys on a YubiKey, use the gpg keys to sign github commits, and publish the public gpg key to Keybase.

Why is this a good idea?

  1. Generating and storing GPG keys on a YubiKey allows the private key to be protected and ported between physical machines.
  2. Signing git commits adds an extra layer of verification that code changes originated from an trusted source.
  3. Using a YubiKey + touch-to-sign requires a physical presence to use the GPG signing key.
  4. GitHub supports restricting commits to a repo to only those that are signed.
  5. Putting a physical stamp on your code commits invokes a feeling of pride.
import {Injectable} from '@nestjs/common';
import {ElasticsearchService} from '@nestjs/elasticsearch';
import * as R from 'ramda';
import {paginatedAsyncIterator} from '@server/common/helpers/db';
import {plainToClass} from 'class-transformer';
import {BookFullInfoSerializer} from '@server/modules/api/serializers';
import {
EntityIndex,
import * as R from 'ramda';
import stringSimilarity from 'string-similarity';
import {createHTMLTag} from '@server/common/helpers/html/createHTMLTag';
import {filterAndMap} from '@shared/helpers';
import {
extractTextWords,
getHTMLInnerText,
isWordCharacter,
{
"Audiobook. - Winnetou. Czerwonoskóry gentleman. Tom 1": {
"type": 3,
"title": "Winnetou. Czerwonoskóry gentleman",
"volume": "1",
"edition": null
},
"Winnetou. Czerwonoskóry gentleman. Tom 1 - Audiobook": {
"type": 3,
"title": "Winnetou. Czerwonoskóry gentleman",
@Mati365
Mati365 / opcodes.json
Created March 5, 2020 13:33
x86 opcodes
{
"aaa": ["","37",""],
"aad": ["","D5 0A",""],
"aam": ["","D4 0A",""],
"aas": ["","3F",""],
"adc": [["rmb rb","10 mr d0 d1",""],["rmw rw","11 mr d0 d1",""],["rb rmb","12 mr d0 d1",""],["rw rmw","13 mr d0 d1",""],["al ib","14 i0",""],["ax iw","15 i0 i1",""],["rmb ib","80 /2 d0 d1 i0",""],["rmw iw","81 /2 d0 d1 i0 i1",""],["rmw ib","83 /2 d0 d1 i0",""]],
"add": [["rmb rb","00 mr d0 d1",""],["rmw rw","01 mr d0 d1",""],["rb rmb","02 mr d0 d1",""],["rw rmw","03 mr d0 d1",""],["al ib","04 i0",""],["ax iw","05 i0 i1",""],["rmb ib","80 /0 d0 d1 i0",""],["rmw iw","81 /0 d0 d1 i0 i1",""],["rmw ib","83 /0 d0 d1 i0",""]],
"and": [["rmb rb","20 mr d0 d1",""],["rmw rw","21 mr d0 d1",""],["rb rmb","22 mr d0 d1",""],["rw rmw","23 mr d0 d1",""],["al ib","24 i0",""],["ax iw","25 i0 i1",""],["rmb ib","80 /4 d0 d1 i0",""],["rmw iw","81 /4 d0 d1 i0 i1",""],["rmw ib","83 /4 d0 d1 i0",""]],
"arpl": ["rmw rw","63 mr d0 d1","286"],
"bound": ["rw rmw","62 mr d0 d1","186"],
format MZ
stack stk:256
entry text:main
macro delay time {
local ext,iter
push cx
mov cx,time
ext:
push cx
[{"score":9090,"neural":{"layers":[{"neuronsMatrix":[{"value":0.8481181345066194},{"value":-1.1485069719759957},{"value":1.0291752299885781},{"value":1.3273447855623552},{"value":2},{"value":2},{"value":2},{"value":1.2674601660781695}],"weightsMatrix":[[1.1179963315792003,-0.7393644430161277,0.6939812918672702,0.7878016312972327,0.9067898490148749,-0.9116947419755952,-0.3846287466160827,0.5399450482576356],[-0.34871383674216155,-0.8659828865329979,-0.09627861769022728,-0.13427546312002114,-0.46107746835986874,-0.13809353581479758,0.8036060972980446,-1.5882111240815728],[0.3631859490124592,-0.12030157726499317,-0.6601128660916425,0.6006719228184938,-0.958388865481941,-0.4024788016829848,0.9909870022900851,1.030879394555638],[0.4065253090853373,1.117779185172078,-0.19634332516981542,0.8410085680417221,0.26689701895927564,1.1900765634804222,0.7001530576111844,0.05688296106601981],[0.9878157181466397,-0.05912759463096313,-0.39524736542942857,-0.8359934585331276,-0.39896750168341555,-0.28690096986021174,-0.1269897
// https://joanpaon.wordpress.com/2013/07/12/how-to-install-a-custom-swing-component-in-netbeans-palette/
package com.korporejszyn.matrix;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import javax.swing.Box;
import javax.swing.BoxLayout;
# copied from https://www.e-rave.nl/create-a-self-signed-ssl-key-for-postfix
openssl genrsa -des3 -out mail.domain.tld.key 2048
chmod 600 mail.domain.tld.key
openssl req -new -key mail.domain.tld.key -out mail.domain.tld.csr
openssl x509 -req -days 365 -in mail.domain.tld.csr -signkey mail.domain.tld.key -out mail.domain.tld.crt
openssl rsa -in mail.domain.tld.key -out mail.domain.tld.key.nopass
mv mail.domain.tld.key.nopass mail.domain.tld.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650
chmod 600 mail.domain.tld.key
@Mati365
Mati365 / rak.c
Last active March 31, 2019 13:03
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <limits.h> // PATH_MAX
#include <unistd.h>