Skip to content

Instantly share code, notes, and snippets.

View Uninen's full-sized avatar
📻
Working on Slipmat.io

Ville Säävuori Uninen

📻
Working on Slipmat.io
View GitHub Profile
@Uninen
Uninen / main.rs
Created September 28, 2022 12:30
Tauri implementation for titleBarStyle: 'hidden'
// See https://github.com/Uninen/tauri-vue-template for more info
#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
use cocoa::appkit::{NSWindow, NSWindowStyleMask, NSWindowTitleVisibility};
use tauri::api::shell;
use tauri::{CustomMenuItem, Manager, Menu, Runtime, Submenu, Window, WindowEvent};
@Uninen
Uninen / Matrix-synapse-docker.md
Created February 11, 2021 16:17 — forked from matusnovak/README.md
Matrix (Synapse + Riot) in Docker with Traefik and federation

Matrix

matrix.org chat is split into two parts, the server and the client. The server we are going to use is called Synapse and the client is Riot.im. The Synapse will also need Postgres database and Redis for caching.

0. Folders

Make sure your folder structure looks like this.

example/
@Uninen
Uninen / karabiner.json
Created November 9, 2020 17:04
Convert useless section key to dollar on Finnish keyboard map. The meat starts fron line 19, rest of the JSON is Karapiner Elements boilerplate.
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@Uninen
Uninen / keybase.md
Created February 10, 2020 15:24
keybase.md

Keybase proof

I hereby claim:

  • I am uninen on github.
  • I am uninen (https://keybase.io/uninen) on keybase.
  • I have a public key ASAmjQwASMrcX3Eq1LQYzpiKv42gNF9tYX4eLBVCtrRzIQo

To claim this, I am signing this object:

@Uninen
Uninen / packages.md
Created April 25, 2018 13:19
Python Packages

Python Packages

Here's a curated list of interesting and useful Python packages. You can install any package with pip by saying pip install <package-name>. All of the packages on the list are open source.

This list has been collected spesifically for Anders Python Workshop evening. For more comprehensive list of interesting Python packages, take a look at https://github.com/vinta/awesome-python and for all 130k+ packages, search PyPI at https://pypi.org/

Development Tools

  • faker - A package for generating fake data (for example testing purposes)
@Uninen
Uninen / countryinfo.py
Created January 2, 2018 20:31 — forked from pamelafox/countryinfo.py
Python list of country codes, names, continents, capitals, and pytz timezones
countries = [
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'},
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'},
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"},
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'},
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'},
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'},
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai
@Uninen
Uninen / dbdamnit.py
Created July 1, 2011 22:40
DbDamnit -- Automagic db configuration for Django
# -*- coding: utf-8 -*-
"""
dbdamnit.py is a management command for creating and configuring MySQL
database settings automagically for Your Django project. This code
uses convention over configuration, feel free to modify and use it
for your own projects as You like.
Happy hacking! :)
- @uninen
<?php
function print_lyhfi_url() {
/*
Example code for using Lyh.fi URLs in WordPress template code, inspired by
http://devmoose.com/coding/automatically-create-a-bitly-url-for-wordpress-posts
Disclaimer: This code is *NOT TESTED* with WordPress.
Lyh.fi API has currently no authentication nor versioning. It expects one