Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Igor Vuk ivuk

🏠
Working from home
View GitHub Profile
@ivuk
ivuk / lxd-exec-rest.py
Last active Apr 25, 2016
LXD REST API 'exec' example
View lxd-exec-rest.py
#!/usr/bin/env python
import httplib
import json
import os
import sys
import urllib
import websocket
URL = '127.0.0.1:8443'
CERT_FILE = os.path.expanduser("~/.config/lxc/client.crt")
@ivuk
ivuk / GobiSerial.c
Created Jul 26, 2014
GobiSerial.c-Netgear-AirCard-341U
View GobiSerial.c
/*===========================================================================
FILE:
GobiSerial.c
DESCRIPTION:
Linux Qualcomm Serial USB driver Implementation
PUBLIC DRIVER FUNCTIONS:
GobiProbe
GobiOpen
@ivuk
ivuk / extract-single-db-pg-dumpall.sh
Created Oct 14, 2013
Extract a single database from a pg_dumpall dump, originally from http://madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/ , modified to work on Fedora 19 and Ubuntu 13.04
View extract-single-db-pg-dumpall.sh
#!/bin/bash
#
# Extract a single db from pg_dumpall dump
# Originally from
# http://madssj.com/blog/2010/04/09/extracting-a-single-database-from-a-pg_dumpall-postgresql-dump/
# Db dump created on RHEL6, parsing done on Fedora 19 and Ubuntu 13.04
#
if [ $# -ne 2 ]; then
echo "Usage: $0 <postgresql sql dump> <db_name>" >&2
@ivuk
ivuk / gist:6241199
Created Aug 15, 2013
Which SSID's did I connect to lately?
View gist:6241199
awk 'BEGIN { printf "%-15s %-30s\n", "Interface", "SSID" } /authenticate/ { printf "%-15s %-30s\n", substr($1, 1, length($1) - 1), substr($8, 7, length($8)-1) }' /var/log/wpa_supplicant.log
You can’t perform that action at this time.