Skip to content

Instantly share code, notes, and snippets.

Avatar

Vahid pylover

View GitHub Profile
@pylover
pylover / install-nodejs.sh
Created Aug 2, 2021
Install nodejs from source on FreeBsd
View install-nodejs.sh
#! /usr/bin/env bash
# Prerequicites
pkg install gcc openssl-devel
# Clone the source
git clone git@github.com:nodejs/node.git -b v16.x --depth 1
# Configure and Build
@pylover
pylover / a2dp.py
Last active Jun 18, 2022
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
View a2dp.py
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware
@pylover
pylover / inspections.txt
Last active Jun 14, 2022 — forked from ar45/inspections.txt
PyCharm inspections
View inspections.txt
# Extracted using: $ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |'
# noinspection PyPep8
# noinspection PyPep8Naming
# noinspection PyTypeChecker
# noinspection PyAbstractClass
# noinspection PyArgumentEqualDefault
# noinspection PyArgumentList
# noinspection PyAssignmentToLoopOrWithParameter
# noinspection PyAttributeOutsideInit
@pylover
pylover / ssh-tun-freebsd.sh
Last active Jun 15, 2022
SSH TUN/TAP for various platforms.
View ssh-tun-freebsd.sh
#! /usr/bin/env bash
HOST=example.com
USER=alice
LTUN=0
RTUN=3
LADDR=192.168.2.4/31
RADDR=192.168.2.3
HOSTADDR=$(dig $HOST +short)
GW=192.168.1.1
FLAGS="-p7575 -N -v -w $LTUN:$RTUN"