Skip to content

Instantly share code, notes, and snippets.

View kareiva's full-sized avatar

Simonas kareiva

  • Red Hat
  • Vilnius
View GitHub Profile
#include <sys/ioctl.h>
main() {
int fd;
fd = open("/dev/ttyUSB0",O_RDWR | O_NOCTTY );//Open Serial Port
int RTS_flag;
RTS_flag = TIOCM_RTS;
ioctl(fd,TIOCMBIS,&RTS_flag);//Set RTS pin
getchar();
ioctl(fd,TIOCMBIC,&RTS_flag);//Clear RTS pin
#!/bin/bash
#
# remove all traces of SkypeForBusiness from OS X user library
# use with caution and your own risk
#
rm -rf ~/Library/Containers/com.microsoft.SkypeForBusiness
rm -rf ~/Library/Internet\ Plug-Ins/MeetingJoinPlugin.plugin
rm -rf ~/Library/Logs/LwaTracing
rm -rf ~/Library/Saved\ Application\ State/com.microsoft.SkypeForBusiness.savedState
rm -rf ~/Library/Preferences/com.microsoft.SkypeForBusiness.plist
[OSEv3:children]
masters
nodes
etcd
glusterfs
[OSEv3:vars]
ansible_ssh_user=centos
ansible_become=true
enable_excluders=false
@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
@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 / 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;
#!/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
#!/usr/bin/python
import datetime
year = 2020
def round_name(week):
return {
1: 'VHF',
2: 'UHF',
This is - Win95.CiH !
****************************************************************************
; * The Virus Program Information *
; ****************************************************************************
; * *
; * Designer : CIH Source : TTIT of TATUNG in Taiwan *
; * Create Date : 04/26/1998 E-mail : [email protected] *
; * Modification Time : 06/01/1998 Version : 1.5 *
; * *
; * Turbo Assembler Version 5.0 : Tasm /m cih *
@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")