Skip to content

Instantly share code, notes, and snippets.

View medvedev's full-sized avatar
🇺🇦

Slava medvedev

🇺🇦
View GitHub Profile
@Eng-Fouad
Eng-Fouad / UserDao.java
Last active December 29, 2023 20:38
Using JDBI in Quarkus (native mode) [JDBI 3.38.2]
package io.fouad.demo.db;
public interface UserDao {
@SqlUpdate("CREATE TABLE user (id INTEGER PRIMARY KEY, name VARCHAR)")
void createTable();
@SqlUpdate("INSERT INTO user(id, name) VALUES (?, ?)")
void insertPositional(int id, String name);
@SqlUpdate("INSERT INTO user(id, name) VALUES (:id, :name)")
@gh640
gh640 / use_python_poetry_cache_on_github_actions_workflow.yml
Last active April 29, 2024 15:05
Sample: Use Python Poetry cache on GitHub Actions workflow
name: Use Python Poetry cache on GitHub Actions workflow
on:
push:
branches:
- main
env:
PYTHON_VERSION: "3.11"
POETRY_VERSION: "1.4.2"
@c060604
c060604 / exif.py
Created May 23, 2017 03:00
User python and piexif to write some gps info into jpg pictures.
import os
import piexif
from fractions import Fraction
def to_deg(value, loc):
"""convert decimal coordinates into degrees, munutes and seconds tuple
Keyword arguments: value is float gps-value, loc is direction list ["S", "N"] or ["W", "E"]
return: tuple like (25, 13, 48.343 ,'N')
"""
@oderwat
oderwat / gist:9158840
Created February 22, 2014 17:45
GoLang HTTP PUT / DELETE (just copied from somewhere else!)
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
const (