Skip to content

Instantly share code, notes, and snippets.

View jkuri's full-sized avatar
🏠
Working from home

Jan Kuri jkuri

🏠
Working from home
View GitHub Profile
@jkuri
jkuri / git-worklog.sh
Created April 20, 2025 18:54
bash script to generate work specifications from git log and outputs generated markdown
#!/bin/bash
# Current month
# ./git-worklog.sh
# Specific month and year
# ./git-worklog.sh --month 3 --year 2025
# Custom output file
# ./git-worklog.sh --month 3 --year 2025 --output april-2025-worklog.md
@jkuri
jkuri / archive.go
Created June 13, 2021 18:11
create tar.gz archives using golang preserving symlinks
func createArchive(folders []string, outPath string) error {
out, err := os.Create(outPath)
if err != nil {
return err
}
defer out.Close()
gw := gzip.NewWriter(out)
defer gw.Close()
@jkuri
jkuri / html-css-timepicker-no-js-final-version.markdown
Created September 9, 2020 01:40
HTML & CSS Timepicker (No Js) - Final Version

HTML & CSS Timepicker (No Js) - Final Version

This pen simulates a functional timepicker using HTML semantic elements and CSS3 super-powers.

Problem Statement: The challenge was to create an interactive timepicker (showing behaviour, usually done by javascript) where user can choose between hours and minutes by clicking on it different base sections.

Solution: Using html radio input elements and css3 animations, i have tried to simulate a functional timepicker.

@jkuri
jkuri / sshd.go
Created April 14, 2018 09:37 — forked from jpillora/sshd.go
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:
@jkuri
jkuri / README.md
Created March 25, 2018 10:57
Output all video devices, capabilities, frame sizes and related framerates on Linux using V4L2

Output all video devices, capabilities, frame sizes and related framerates on Linux using V4L2

Compile it using

clang -o print_devices print_devices.c

Example output

@jkuri
jkuri / README.md
Created March 25, 2018 01:53
Output all video capture devices with all video modes available on MacOS using AVFoundation framework

Output all video capture devices with all video modes available on MacOS using AVFoundation

Compile program using:

clang -o video_capture_devices video_capture_devices.m -framework Foundation -framework AVFoundation -framework CoreMedia

Sample output:

//
// Copyright (c) 2014 Sean Farrell
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
@jkuri
jkuri / cv2ff.cpp
Created January 16, 2018 05:58 — forked from yohhoy/cv2ff.cpp
Convert from OpenCV image and write movie with FFmpeg
/*
* Convert from OpenCV image and write movie with FFmpeg
*
* Copyright (c) 2016 yohhoy
*/
#include <iostream>
#include <vector>
// FFmpeg
extern "C" {
#include <libavformat/avformat.h>
@jkuri
jkuri / tcp_server.c
Created December 26, 2017 11:53 — forked from oleksiiBobko/tcp_server.c
Simple socket server in C using threads (pthread library) Compiles on linux
/*
C socket server example, handles multiple clients using threads
Compile
gcc server.c -lpthread -o server
*/
#include<stdio.h>
#include<string.h> //strlen
#include<stdlib.h> //strlen
#include<sys/socket.h>
@jkuri
jkuri / proxy.go
Created November 16, 2017 16:20 — forked from vmihailenco/proxy.go
Simple TCP proxy in Golang
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"