Skip to content

Instantly share code, notes, and snippets.

View imneonizer's full-sized avatar
:octocat:
Developing for the python community!

Nitin Rai imneonizer

:octocat:
Developing for the python community!
  • SmartCow.ai
  • Delhi, India
  • 02:56 (UTC +05:30)
  • X @imneonizer
View GitHub Profile
cat ~/.netrc
machine github.com login <login-id> password <token-password>
# https://gist.github.com/Lazza/bbc15561b65c16db8ca8
import os
import requests
import base64
import time
import subprocess as sp
class VpnGate:
def __init__(self, country, config='/tmp/vpngate.ovpn'):
#!/bin/bash
# https://itsfoss.com/speed-up-slow-wifi-connection-ubuntu/
# increase wifi adapter power
# sudo iwconfig
sudo iwconfig wlo1 power off
@imneonizer
imneonizer / how-to-download-from-pan-baidu.md
Created October 28, 2021 08:59
How to download from pan.baidu without account

How to download from pan.baidu.com

Disclaimer:

  • This methods uses a 3rd party website: https://baidu.kinh.cc/.
  • I don't know chinese and after one day of searching for a method I finally found this. I don't know how safe this website is but it does the job.
  • Do it on your own responsibility. I have no idea about possible copyright (if there is such a thing in China) and other stuff regarding to this.

Steps

1. Open the website mentioned above and fill out fields as following:

@imneonizer
imneonizer / refrate.sh
Last active September 29, 2022 10:35
Update Monitor refresh rates from terminal
#!/bin/bash
function set_refresh_rate(){
xrandr -d :1 --output $1 --mode $2 --rate $3
}
# update refresh rate for main monitor
set_refresh_rate DP-0 2560x1440 60.00
sleep 0.5
set_refresh_rate DP-0 2560x1440 164.96
@imneonizer
imneonizer / ipwebcam.sh
Last active January 3, 2023 04:12
Using Android as HD webcam
#!/bin/bash
export ANDROID_SERIAL=`adb devices -l | grep -i oneplus | awk '{print $1}'`
export HOST_PORT=8080
export IPWEBCAM_PORT=8080
export V4L2_DEVICE=/dev/video0
function start_screen_mirror(){
if [ ! `pgrep scrcpy` ];then
@imneonizer
imneonizer / portsi.py
Last active October 12, 2021 07:38
Portsi is used to scan network for open ports
import socket
from contextlib import closing
from concurrent.futures import ThreadPoolExecutor
from itertools import product
class Portsi:
def __init__(self, timeout: float = 2.0, workers: int = 1000):
"""Portsi is used to scan network for open ports
Args:
@imneonizer
imneonizer / client.py
Created September 13, 2021 08:26
HiveMQTT Custom Req-Resp with Auth
# pip install paho-mqtt
import paho.mqtt.client as paho
import paho.mqtt.subscribe as subscribe
import uuid
import contextlib
import threading
import json
import time
class MQTTClient:
@imneonizer
imneonizer / droid_cam.sh
Created August 30, 2021 07:35
Automatically discover droidcam client
#!/bin/bash
export ANDROID_SERIAL=`adb devices -l | grep -i oneplus | awk '{print $1}'`
droidcam-cli adb 4747&
scrcpy
@imneonizer
imneonizer / capture.sh
Created August 30, 2021 04:11
capture rtsp snapshot using gstreamer
# https://stackoverflow.com/questions/59025321/capture-jpeg-images-from-rtsp-gstreamer
gst-launch-1.0 rtspsrc location="rtsp://admin:123456@192.168.0.123/stream0" num-buffers=1 \
! rtph264depay ! avdec_h264 \
! nvjpegenc ! multifilesink location="./frame.jpg"