Skip to content

Instantly share code, notes, and snippets.

View geokal's full-sized avatar

George Kal geokal

  • Fogus Innovations & Services
  • Athens, Greece
View GitHub Profile
"""
A simple Python script to receive messages from a client over
Bluetooth using Python sockets (with Python 3.3 or above).
"""
import socket
hostMACAddress = '00:1f:e1:dd:08:3d' # The MAC address of a Bluetooth adapter on the server. The server might have multiple Bluetooth adapters.
port = 3 # 3 is an arbitrary choice. However, it must match the port used by the client.
backlog = 1
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'
@geokal
geokal / jessie-mssql.md
Created October 4, 2017 10:48 — forked from brianherman/jessie-mssql.md
Debian Jessie and mssql-server

Download mssql from the microsoft website.

wget https://packages.microsoft.com/ubuntu/16.04/mssql-server/pool/main/m/mssql-server/mssql-server_14.0.1.246-6_amd64.deb

dpkg -i mssql-server_14.0.1.246-6_amd64.deb 

The next command will install dependancies.

sudo apt-get -f install 
@geokal
geokal / ip_lookup.ps1
Created February 27, 2018 09:54 — forked from jrothmanshore/ip_lookup.ps1
Powershell script for performing reverse lookups of IP Addresses
$stop = $args.Count
$inputIP = ""
$inputFile = ""
$knownIPFile = ""
$showUsage = 0
$verbose = 0
for ($i = 0; $i -lt $stop; $i++)
{
if ($args[$i] -eq "-f") {
if ( ($i + 1) -eq $stop) {
@geokal
geokal / promiscuous_mode.txt
Created August 31, 2018 20:50 — forked from mhtsai1010/promiscuous_mode.txt
Enable promiscuous mode of vmware on a Linux Host
Ref: https://bbs.archlinux.org/viewtopic.php?id=65508
1/ Method 1
# First, create a new Linux group which has permission to use promiscuous mode, and add yourself to the group.
$ groupadd promiscuous
$ usermod -a -G promiscuous <your_user_id>
# Update the group ownership and access permission of /dev/vmnet*
$ chgrp promiscuous /dev/vmnet*
$ chmod g+rw /dev/vmnet*
@geokal
geokal / mininetSocketTest.py
Created September 6, 2018 13:25 — forked from dufferzafar/mininetSocketTest.py
Difference from the fork: PEP8 + Fix "Could not find a default OpenFlow controller" issue
#!/usr/bin/python
from mininet.node import OVSController
from mininet.topo import SingleSwitchTopo
from mininet.net import Mininet
from mininet.log import lg
from mininet.cli import CLI
@geokal
geokal / ovs-cheat.md
Created September 7, 2018 07:54 — forked from djoreilly/ovs-cheat.md
OVS cheat sheet

DB

ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl --format=table --columns=name,mac_in_use find Interface name=br-dpdk1
ovs-vsctl get interface vhub656c3cb-23 name

ovs-vsctl set port vlan1729 tag=1729
@geokal
geokal / Open vSwitch Lab.md
Created September 7, 2018 10:11 — forked from djoreilly/Open vSwitch Lab.md
Open vSwitch Lab

#Open vSwitch Lab

Get started with Open vSwitch, flows and OpenFlow controllers.

##Pre-reqs

Linux system with OVS installed.

##Setup

@geokal
geokal / hfsc-shape.sh
Created September 10, 2018 06:38 — forked from bradoaks/hfsc-shape.sh
HFSC - linux traffic shaping's best kept secret
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.
@geokal
geokal / youtube.sh
Created November 23, 2018 19:35 — forked from dantheman213/youtube-dl_cheatsheet.md
youtube-dl cheatsheet -- Download entire youtube playlist and more!
# https://github.com/rg3/youtube-dl/
# On ubuntu: apt-get install libav-tools
# Download Playlist to batch of MP3s
youtube-dl -f bestvideo+bestaudio --extract-audio --audio-format mp3 --prefer-avconv --playlist-random https://www.youtube.com/playlist?list=XXXXX
# Download individual song
youtube-dl -f bestvideo+bestaudio --extract-audio --audio-format mp3 --prefer-avconv https://www.youtube.com/watch?v=ZZZZZZZ