Skip to content

Instantly share code, notes, and snippets.

View OctoNezd's full-sized avatar
:shipit:
that squirrel looks like a fish

Yan OctoNezd

:shipit:
that squirrel looks like a fish
View GitHub Profile

Android mic streamig

In this text I show how to use your android phone as microphone for your pc desktop using sox over ssh.

1 - Configure the desktop

You need have a pulseaudio server running in your pc desktop. Make a simple virtual microphone device using the following:

pactl load-module module-pipe-source source_name=virtmic file=/tmp/virtmic format=s32 rate=48000 channels=1
@qzm
qzm / aria2.conf
Last active July 28, 2024 11:14
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
#!ipxe
# 2021-01-19
# made by https://github.com/beta-tester
# for project https://github.com/beta-tester/RPi-PXE-Server
########################################################################
### CHAIN LOAD SERVER VERSION OF iPXE
:begin_ipxe_chainload_serverversion
@androidneha
androidneha / adb_commands.MD
Last active July 4, 2024 12:21
Some adb commands to change setting for battery optimisation, start service, stop service, grant permission, revoke permission and etc.

To list-up installed app

pm list packages

Search for a particualr app with pacakagename

pm list pacakges | grep com.abc

Turn on Battery Optimization for a particular app

adb shell dumpsys deviceidle whitelist -<package_name>

Turn off Battery Optimization for a particular app

@fnky
fnky / ANSI.md
Last active July 29, 2024 03:05
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@CHERTS
CHERTS / how-to-install-telegram-send
Last active August 29, 2022 11:19
Fail2ban + Telegram using telegram-send
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.9 (jessie)
Release: 8.9
Codename: jessie
Installing telegram-send
# pip install telegram-send
@lpimem
lpimem / aria2c.py
Last active December 25, 2023 21:12
Aria2 Python Client
import json
import requests
class Aria2c:
'''
Example :
client = Aria2c('localhost', '6800')
# print server version
@malexandre
malexandre / xls-to-xlsx-conversion.py
Last active October 28, 2021 18:58
Convert xls file to xlsx in python
import xlrd
from openpyxl.workbook import Workbook as openpyxlWorkbook
# content is a string containing the file. For example the result of an http.request(url).
# You can also use a filepath by calling "xlrd.open_workbook(filepath)".
xlsBook = xlrd.open_workbook(file_contents=content)
workbook = openpyxlWorkbook()
for i in xrange(0, xlsBook.nsheets):