Skip to content

Instantly share code, notes, and snippets.

View kareiva's full-sized avatar

Simonas kareiva

  • Red Hat
  • Vilnius
View GitHub Profile
@kareiva
kareiva / knife cheat
Last active August 29, 2015 14:24 — forked from ipedrazas/knife cheat
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway
#!/usr/bin/perl -w
#
# check_ssl_certificate
# Nagios script to check ssl certificate expirations
#
# Copyright (c) 2006-2008 David Alden <alden@math.ohio-state.edu>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
@kareiva
kareiva / openstack-glance-cleanup.py
Created January 16, 2016 13:00
A tool to cleanup openstack glance database from all deleted images. Inspired by https://gist.github.com/mousavian/d68bcd903207366c1bfd
import mysql.connector
uuids = []
class MySQLCursorDict(mysql.connector.cursor.MySQLCursor):
def _row_to_python(self, rowdata, desc=None):
row = super(MySQLCursorDict, self)._row_to_python(rowdata, desc)
if row:
return dict(zip(self.column_names, row))
return None
cnx = mysql.connector.connect(host="localhost", user="glance", passwd="", db="glance")
This is - Win95.CiH !
****************************************************************************
; * The Virus Program Information *
; ****************************************************************************
; * *
; * Designer : CIH Source : TTIT of TATUNG in Taiwan *
; * Create Date : 04/26/1998 E-mail : WinCIH.Tatung@usa.net *
; * Modification Time : 06/01/1998 Version : 1.5 *
; * *
; * Turbo Assembler Version 5.0 : Tasm /m cih *
#!/usr/bin/python
import datetime
year = 2020
def round_name(week):
return {
1: 'VHF',
2: 'UHF',
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: Wspr Hackrf
# Generated: Wed Aug 17 21:55:01 2016
##################################################
from gnuradio import audio
from gnuradio import blocks
@kareiva
kareiva / TS-590S.xml
Created February 11, 2017 18:56
TS-590S rig definition file for use with fldigi
<!-- Rig definition file for use with fldigi
Date : 25 July 2012
-->
<RIGDEF>
<RIG>Kenwood TS-590S</RIG>
<PROGRAMMER>
Dave Freese, W1HKJ;
@kareiva
kareiva / relay.py
Created March 25, 2017 21:49
Example how to use wiringpi2 library for Odroid C1+
#!/usr/bin/python
# Example how to use relay board with Odroid C1+
#
# Installation instructions:
# https://github.com/hardkernel/WiringPi2-Python/
#
# Pinout:
# http://pi4j.com/images/odroid-xu4-shifter-shield-pinout-large.png
@kareiva
kareiva / aprx.conf
Created June 20, 2017 17:18
Example APRS iGate configuration
mycall LY2EN-3
myloc lat 5443.45N lon 02517.30E
<aprsis>
passcode -1
server euro.aprs2.net
heartbeat-timeout 1m
</aprsis>
<logging>
pidfile /var/run/aprx.pid
[OSEv3:children]
masters
nodes
etcd
glusterfs
[OSEv3:vars]
ansible_ssh_user=centos
ansible_become=true
enable_excluders=false