Skip to content

Instantly share code, notes, and snippets.

View neurobin's full-sized avatar

Md Jahidul Hamid neurobin

View GitHub Profile

Setup tor proxy on Arch Linux

Copied from this article.

Installation

  1. Install tor

         $ sudo pacman -S tor
         $ ## nyx provides a terminal status monitor for bandwidth usage, connection details and more.

$ sudo pacman -S nyx

@neurobin
neurobin / deploy.md
Created January 18, 2024 12:55 — forked from sambeirne/deploy.md
Deploy a Python WebSocket Server on Debian 10 ("buster") with systemd and nginx

Deploy a Python WebSocket Server on Debian 10 ("buster") with systemd and nginx

Following are configuration files and instructions for using systemd to create Unix domain sockets to handle incoming websocket requests. Websocket requests are proxied by nginx.

While these instructions are for Debian 10, they should largely work on other Linux distributions. It may be necessary to change paths and the nginx username, which is www-data when installed with the Debian package manager.

Install requirements

user@host:~$ sudo apt update
user@host:~$ sudo apt install nginx python3 wget

How to make WordPress a plugin require another plugin?

Put this function on the main php file of your dependent plugin and call it with the rigth parameters.

/**
 * Verify if a plugin is active, if not deactivate the actual plugin an show an error
 * @param  [string]  $my_plugin_name
 *                   The plugin name trying to activate. The name of this plugin
 *                   Ex:

Update 7/28/2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox
  2. Right-click your VM, then click Settings
  3. Go to Shared Folders section
@neurobin
neurobin / TorPrivoxyPython.md
Created August 19, 2019 17:01 — forked from DusanMadar/TorPrivoxyPython.md
A step-by-step guide how to use Python with Tor and Privoxy

A step-by-step guide how to use Python with Tor and Privoxy

Tested on Ubuntu 18.04 Docker container. The Dockerfile is a single line FROM ubuntu:18.04. Alternatively, you can simply run docker run -it ubuntu:18.04 bash.

NOTE: stopping services didn't work for me for some reason. That's why there is kill $(pidof <service name>) after each failed service <service name> stop to kill it.

References

This guide is basically a compilation of all the resources listed below.

@neurobin
neurobin / whatsapp_sendMSG.js
Created September 3, 2018 09:54 — forked from yask123/whatsapp_sendMSG.js
Send messages on whatsapp by Javascript
document.getElementsByClassName("input")[1].innerHTML="This message was written via JS script! "; // Fills the text box message
var input = document.getElementsByClassName("icon btn-icon icon-send");//Grabs the send button
input[0].click();// Clicks the send button
@neurobin
neurobin / rmduppac
Created August 20, 2017 15:03
Remove duplicates from /var/lib/pacman/local to resolve errors such as "error: duplicated database entry 'man-pages'"
#!/usr/bin/python
import os,re, datetime
d = '/var/lib/pacman/local'
packages = os.listdir(d)
packages.sort()
pkgname_search = re.compile('^(.*?)-[0-9]')

Custom Arch Linux live USB

Setup

Install the dependencies for the archiso package:

(root): pacman -S make squashfs-tools libisoburn dosfstools patch lynx devtools git

I recommend archiso getting them from git, there is a package in the repositories, however, at this time of writing, it will not work with the instructions below. So, grab the most recent version from git and install it:

(user): git clone git://projects.archlinux.org/archiso.git && cd archiso

@neurobin
neurobin / di-udeb-pkg.list
Created March 30, 2017 20:39
Debian installer udeb package list
acpi-modules-${kernel:Version}
alsa-utils-udeb
anna
#apt-setup-udeb
#apt-mirror-setup
#apt-cdrom-setup
archdetect
ata-modules-${kernel:Version}
attr-udeb
base-installer
/*************************************************
* PCRE2 DEMONSTRATION PROGRAM *
*************************************************/
/* This is a demonstration program to illustrate a straightforward way of
calling the PCRE2 regular expression library from a C program. See the
pcre2sample documentation for a short discussion ("man pcre2sample" if you have
the PCRE2 man pages installed). PCRE2 is a revised API for the library, and is
incompatible with the original PCRE API.