Skip to content

Instantly share code, notes, and snippets.

View zvyn's full-sized avatar
🐧

Milan Oberkirch zvyn

🐧
View GitHub Profile
@zvyn
zvyn / readme.md
Last active January 26, 2024 22:31

These utils help to generate a JSON file to import all passwords from password-store into Vaultwarden / Bitwarden.

Steps that worked for me:

  1. follow the "Export from password-store" part in https://www.amoradi.org/20210728132516.html
  2. Install the bitwarden command line client and authenticate
  3. Run fids = get_folder_id_map(<path>) and make sure you keep the result somewhere (I just had a ipython session to do all this)
  4. Create a JSON-Exort in Vault-/Bitwarden
  5. Load the export into Python, replace items with list(gen_items(<path>, fids)), json.dump the result to disk
  6. Load the created file into Vault-/Bitwarden

Keybase proof

I hereby claim:

  • I am zvyn on github.
  • I am zvyn (https://keybase.io/zvyn) on keybase.
  • I have a public key whose fingerprint is 1DDB 1A75 41A8 7631 5011 411C 6B2D 19D7 8E36 42A1

To claim this, I am signing this object:

efibootmgr --create --disk /dev/sdc --part 1 --label "Something New" --loader "EFI\arch\vmlinuz-arch.efi" -@ new_cmdline.conf
@zvyn
zvyn / config.json
Created January 31, 2016 06:53 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#5b9aa9, 6.5%)",
"@brand-success": "#889a3a",
@zvyn
zvyn / dump-imap.py
Last active August 29, 2015 14:27 — forked from FiloSottile/dump-imap.py
Simple script to dump an IMAP folder into eml files
#!/usr/bin/env python3
#-*- coding:utf-8 -*-
import imaplib
import getpass
import argparse
argparser = argparse.ArgumentParser(description="Dump a IMAP folder into .eml files")
argparser.add_argument('-s', dest='host', help="IMAP host, like imap.gmail.com", required=True)
argparser.add_argument('-u', dest='username', help="IMAP username", required=True)
@zvyn
zvyn / maybe.py
Last active December 29, 2016 04:33 — forked from senko/maybe.py
# maybe.py - a Pythonic implementation of the Maybe monad
# Copyright (C) 2014. Milan Oberkirch <milan.py@oberkirch.org>
# Copyright (C) 2014. Senko Rasic <senko.rasic@goodcode.io>
#
# 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:
[Unit]
Description=Create dynamic bg.svg in /tmp.
[Service]
User=nobody
Group=nobody
ExecStart=/usr/local/bin/dynbg.py /usr/local/etc/dynbg.svg /tmp/bg.svg
Restart=no
Type=oneshot
#!/bin/env python
import logging
def float_to_bin(x):
p = 0
while ((2 ** p) * x) % 1 != 0:
logging.info('Remainder = %s' % ((2 ** p) * x - int((2 ** p) * x)))
p += 1
@zvyn
zvyn / designer.html
Created June 10, 2014 14:40
designer
<link rel="import" href="../core-pages/core-pages.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
<template>
<style>
function ssh_no_memory() {
command ssh $*
echo -n "Remove "
tail -1 $HOME/.ssh/known_hosts | cut -d' ' -f1 | tr -d '\n'
echo " from known hosts?"
read yesno
case $yesno in
Y|y|Yes|yes|YES|Nagut|Jo|Jepp|Jadoch|klar)
sed -i '$ d' $HOME/.ssh/known_hosts
;;