Skip to content

Instantly share code, notes, and snippets.

View kareiva's full-sized avatar

Simonas kareiva

  • Red Hat
  • Vilnius
View GitHub Profile
#!/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
#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
@kareiva
kareiva / disable_ipv6.sh
Created November 3, 2019 20:39
Disable IPv6 on Centos7
#!/bin/bash
sed -i 's/GRUB_CMDLINE_LINUX="/GRUB_CMDLINE_LINUX="ipv6.disable=1 /' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
@kareiva
kareiva / -
Created November 8, 2019 08:09
provider "openstack" {
user_name = "admin"
tenant_name = "containers"
}
data "openstack_networking_floatingip_v2" "fip_jump" {
address = "193.219.144.110"
}
data "openstack_networking_floatingip_v2" "fip_master1" {
@kareiva
kareiva / lectures.py
Created April 28, 2020 07:53
CW lecture generator based on Osvald's LY2BJ training method
#!/usr/bin/env python3
import sys
import random
import string
from urllib.parse import quote
letters = 'eistmohanrkuwdgvflpjbxcyzq?/.,'
numbers = '1234567890'
lectures = [3, 3, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
out = 'vvv '
@kareiva
kareiva / trispalve.asm
Last active October 19, 2021 04:27
This code prints the flag of Lithuania on a 6502 chip's video memory
; Load colors to the stack
LDA #$00
PHA
LDA #$08
PHA
LDA #$05
PHA
LDA #$07
PHA
import meshtastic
from pubsub import pub
def onReceive(packet):
print(f"Received: {packet}")
if ( packet['hopLimit'] > 0 and "decoded" in packet and
packet['decoded']['data']['typ'] == 'CLEAR_TEXT' ):
interface.sendText(
'SNR ' + str(packet['rxSnr']) + ': ' + packet['decoded']['data']['text'])
#!/usr/bin/env python
# Connect to APRS-IS to scan for a specific callsign
from datetime import date
import aprslib
import smtplib
import logging
callsign_filter = 'LY1BWB-12'
@kareiva
kareiva / pingpong.pas
Last active December 1, 2021 17:35
This code is 20yrs old, but it somewhat works with ptcgraph unit
{
��������������������������ͻ
�Simonas Kareiva �
� 2000 12 22 6:30 AM �
� PinGPonG v0.01 �
� questions:[email protected]
��������������������������ͼ
}
program pingpong;
uses Crt, ptcgraph;
@kareiva
kareiva / updike.bashrc
Last active August 6, 2021 18:44
Updike - print system uptime in wiener length.
alias updike='/usr/bin/uptime | perl -ne "/(\d+) d/;print 8,q(=)x\$1,\"D\n\""'