Skip to content

Instantly share code, notes, and snippets.

View alovak's full-sized avatar
🚀
Creating

Pavel Gabriel alovak

🚀
Creating
View GitHub Profile
Field Name Description Length Encoding Request/Response Example Value
0 MTI Message Type Indicator 4 Fixed BCD Both 0100 / 0110
1 Bitmap Bitmap indicating presence of data elements 8 Fixed Binary Both 7FFFFFFFFFFF0000
2 Primary Account Number (PAN) The cardholder's account number Up to 19 Variable (LL) BCD Request 1234567890123456
3 Amount Transaction amount in the smallest currency unit. The value is right justified with leading zeroes. 6 Fixed BCD Both 000100 (for 1.00)
4 Transmission Date & Time The date and time the message was sent 20 Fixed BCD Both 20230810123456
5 Approval Code Code for approving the transaction 2 Fixed BCD Response 00
6 Authorization Code Code for authorizing the transaction 6 Fixed BCD Response 123456
7 Currency Transaction currency code 3 Fixed BCD Both 840 (for USD)
@alovak
alovak / .dotfiles-init
Last active February 21, 2024 11:12
Init .dotfiles
echo "alias config='/usr/bin/git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME'" >> ~/.bashrc
git clone --bare https://github.com/alovak/.dotfiles.git $HOME/.dotfiles
git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME config --local status.showUntrackedFiles no
echo ".dotfiles repo cloned. Reload bash to use `config` command"
package network
import (
"bytes"
"encoding/binary"
"fmt"
"io"
"math"
)
NEWLINE=$'\n'
PROMPT='%{$fg[cyan]%}%~%{$reset_color%} $(git_prompt_info)${NEWLINE}'
PROMPT+="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}[%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$fg[blue]%}]"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}]"
@alovak
alovak / main.go
Created June 2, 2021 15:22
moov-io/iso8583 example
package main
import (
"github.com/moov-io/iso8583"
"github.com/moov-io/iso8583/encoding"
"github.com/moov-io/iso8583/field"
"github.com/moov-io/iso8583/prefix"
)
func NewSpec() *iso8583.MessageSpec {
@alovak
alovak / fixlinks
Last active January 19, 2022 16:52
notion.so export to html
[{"slug"=>"tray-io", "active"=>true, "company"=>"tray.io", "category_name"=>"Automation", "category_slug"=>"automation", "description"=>"The Tray Platform offers cloud stack integration and flexible automation, with an easy-to-use visual editor that empowers business users to build efficient workflows without the need for expensive development resources and enterprise-grade security with PCI Compliance and SOC 2 certification.", "description_html"=>"The Tray Platform offers cloud stack integration and flexible automation, with an easy-to-use visual editor that empowers business users to build efficient workflows without the need for expensive development resources and enterprise-grade security with PCI Compliance and SOC 2 certification.", "how_it_works"=>"Use the Tray Platform to integrate Stripe with the rest of your stack. Flow important payment data between Stripe and your CRM, marketing platform, helpdesk, and other apps for marketing, sales, support, finance, and HR operations. Visit Tray.io to explore
@alovak
alovak / index.html
Created December 9, 2018 13:27
Verify Demo
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Demo Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://js.verifypayments.dev/sdk.js"></script>
<script src="main.js"></script>
</head>
<body>
version: '2'
services:
postgres:
image: 'postgres:9.6-alpine'
environment:
POSTGRES_USER: 'user'
POSTGRES_PASSWORD: 'pass'
ports:
- '5432:5432'
a = (1..100).to_a.rotate 7
x = 2
steps = 0
n = 0
l = 0
r = a.length
while true do
steps+=1