Skip to content

Instantly share code, notes, and snippets.

View xslim's full-sized avatar

Taras Kalapun xslim

View GitHub Profile
@xslim
xslim / pw_parser.py
Created January 15, 2023 17:09
PredictWind JSON track parser
#!/usr/bin/env python3
import argparse, json
from datetime import datetime
from haversine import haversine, Unit
from tabulate import tabulate
parser = argparse.ArgumentParser(description='PredictWind JSON parser')
parser.add_argument('file', type=argparse.FileType('r'))
args = parser.parse_args()
@xslim
xslim / Dockerfile
Last active November 9, 2020 17:57
go cobra Dockerfile
FROM golang:alpine
LABEL maintainer Taras Kalapun <[email protected]>
RUN apk add --no-cache git
RUN go get -u github.com/spf13/cobra
RUN go get -u github.com/spf13/viper
RUN go get -u github.com/mitchellh/go-homedir
//
// TransactionReceiptView.swift
// AdyenPOSTerminal
//
// Created by Taras Kalapun on 11/19/15.
//
//
import UIKit
import AdyenToolkit

July

  • 27-28 July : Amsterdam -> Mademblick

August sailing

  • 3 : Mademblick -> West-Terschelling
  • 4 : Day on West-Terschelling island
  • 5 : Depart West-Terschelling towards Helgoland
  • 5-6 : West-Terschelling -> Helgoland
  • 7 : Day at Helgoland
  • 8 : Helgoland -> TBD
@xslim
xslim / before_after.md
Last active February 14, 2019 16:38
Trim receipt line in C

Before

40|           Oracle HGBU HDS EMEA          
40|             VAT: 123 456 789            
40| 440010051  UK Manager                   
40| ----------------------------------------
40| CHK 1005                         TBL 9/1
40| ----------------------------------------
40|  1 Poached Pear                     4.50
@xslim
xslim / VirtualBox.md
Created December 13, 2018 10:36
VirtualBox things

Win10

Mac screen resolution

  • 2560x1600

  • 1280x800

  • VBoxManage modifyvm "Win10" --vram 256

  • VBoxManage getextradata "Win10" enumerate

  • VBoxManage setextradata "Win10" CustomVideoMode1 1920x1200x32

-(void)removeAllPaymentDevices:(id)args
{
NSLog(@"removing all payment devices");
ADYDeviceRegistry* deviceRegistry = [Adyen sharedInstance].deviceRegistry;
NSMutableArray* devices = deviceRegistry.devices.copy;
for (ADYDevice* device in devices) {
if (device.connectionType == ADYDeviceConnectionTypeWifi && device.hostname != nil && ![device.hostname isEqualToString:@""]) {
#!/bin/bash
POIID=YOUR_TERMINAL_SERIAL_NUMBER
url=https://terminal-api-test.adyen.com/sync
apikey="YOUR_CHECKOUT_API_KEY"
SaleID="${USER}-${HOSTNAME}"
ServiceID=$(date +%m%d%H%M%S)
TransactionID=$RANDOM
TimeStamp=$(date -u +%FT%T+00:00)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">

Keybase proof

I hereby claim:

  • I am xslim on github.
  • I am kalapun (https://keybase.io/kalapun) on keybase.
  • I have a public key whose fingerprint is 3E8B 6BA3 7DA6 0C04 A12D 0298 369A FECC D6DD 12C0

To claim this, I am signing this object: