Skip to content

Instantly share code, notes, and snippets.

@roman-yepishev
roman-yepishev / nb0-unpack.py
Created February 20, 2018 02:06
Unpack script for NB0 file format
#! python3
import argparse
import io
from struct import unpack
BUFFER_SIZE = io.DEFAULT_BUFFER_SIZE
@roman-yepishev
roman-yepishev / dell-os-recovery-linux-mini-howto.md
Last active September 17, 2023 14:13
Dell OS Recovery Tool under Linux Mini-HOWTO

Dell OS Recovery Tool Under Linux Mini-HOWTO

Since I was unable to find a specific answer to how can one create a Dell recovery disk from within Linux, I decided to write the steps here.

If you write the CD image directly to the USB drive (or create a new partition and write it there), the laptop will not boot. You need your USB media to be in FAT32 format with the contents of the recovery ISO.

  1. Download the recovery ISO from the support section of Dell website.
  2. Insert a USB Drive with enough capacity to hold the contents of the ISO image.
  3. Format the drive and create a filesystem where $USB_DEVICE is your USB drive (check with fdisk -l, it may be
@roman-yepishev
roman-yepishev / zohovault2keepass.py
Last active April 6, 2018 06:07
Converts ZohoVault export to KeePassX .kdb (python 3 only)
#!/usr/bin/python3
"""Convert Zoho Vault Export CSV to KeePass KDB
Usage: zohovault2keepass.py ZohoVault.csv keepass.kdb
You will be prompted for the encryption password.
"""
import csv
@roman-yepishev
roman-yepishev / ssh-twisted.py
Created January 3, 2012 16:00
twisted ssh
#!/usr/bin/env python
import sys
import gdbm
from twisted.conch.unix import UnixSSHRealm
from twisted.cred import portal
from twisted.cred.credentials import IUsernamePassword
from twisted.cred.checkers import ICredentialsChecker
from twisted.cred.error import UnauthorizedLogin
@roman-yepishev
roman-yepishev / featureserver-geojson.py
Last active August 1, 2016 02:28
Brute-force ArcGIS Feature Layer to GeoJSON exporter
#!/usr/bin/python3
import json
import os
import sys
import math
import requests
import fiona
@roman-yepishev
roman-yepishev / numbererer.py
Last active March 4, 2016 13:16
Autonumbering magic for Boston
#!/usr/bin/python3
import os
import sys
import xml.sax
import xml.sax.saxutils
import xml.sax.xmlreader
import sqlite3
@roman-yepishev
roman-yepishev / quickaddrinfo.c
Created February 27, 2016 17:52
AF_UNSPEC resolver for localhost
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <string.h>
#include <netdb.h>
int main()
{
struct addrinfo hints;
struct addrinfo *result;
@roman-yepishev
roman-yepishev / keybase.md
Created February 5, 2016 00:43
Verifying myself on Keybase

Keybase proof

I hereby claim:

  • I am roman-yepishev on github.
  • I am rye (https://keybase.io/rye) on keybase.
  • I have a public key ASDVjzC3b2R-iMYCcgjhyVdcUZgJS3O8OJ8uTqrkn81Wiwo

To claim this, I am signing this object:

@roman-yepishev
roman-yepishev / telepathy-couchdb-logger.py
Created November 27, 2013 13:27
Telepathy/desktopcouch logger POC
#!/usr/bin/env python
"""Telepathy CouchDB Logger"""
from dbus.mainloop.glib import DBusGMainLoop
import gobject
import dbus
#for observer thing
import telepathy
import telepathy.server
@roman-yepishev
roman-yepishev / gvfs-mtp-contenttype.patch
Created September 10, 2013 05:37
Set content type for files uploaded via gvfs-mtp
diff -ur ../gvfs-1.16.3.orig/daemon/gvfsbackendmtp.c ./daemon/gvfsbackendmtp.c
--- ../gvfs-1.16.3.orig/daemon/gvfsbackendmtp.c 2013-09-10 08:20:43.199638261 +0300
+++ ./daemon/gvfsbackendmtp.c 2013-09-10 08:27:06.859955187 +0300
@@ -33,6 +33,7 @@
#include <glib/gstdio.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
+#include <glib.h>
#include <libmtp.h>