Skip to content

Instantly share code, notes, and snippets.

View chankruze's full-sized avatar
🎯
Focusing

Chandan Kumar Mandal chankruze

🎯
Focusing
View GitHub Profile
git tag -l | xargs -n 1 git push --delete origin
git tag | xargs git tag -d
  • Create project django-admin startproject <project_name>

  • Create application

cd <project_dircetory>
python manage.py startapp <app_name>
  • Create view

Setup Virtual Environment

  • Install Virtual Environment
pip install virtualenv
  • Test the installation
export PATH=$PATH:/home/chankruze/.local/bin
virtualenv --version
sudo nano /etc/NetworkManager/system-connections/Potter.nmconnection
[connection]
id=Potter
uuid=366f22e1-492d-4b08-8457-da3ccfe425a6
type=wifi
permissions=
#!/bin/bash 
  
#reading data from the user 
read -p 'Enter file name : ' FileName 
  
if [ -e $FileName ] 
then 
    echo File Exist 
else
sudo sh -c "apt-get update -y; apt-get install apache2 -y; systemctl start apache2.service"
sudo apt-get install php -y
sudo systemctl enable apache2.service
sudo systemctl restart apache2.service
sudo nano /etc/apache2/mods-enabled/dir.conf
sudo systemctl restart apache2
sudo systemctl status apache2
sudo -s
nano /etc/systemd/system/php.service

php.service file

[Unit]
Description=My PHP Web Server Service
After=network.target
mkdir -p build/bhcmgr_1.0-1/usr/local/;
mkdir build/bhcmgr_1.0-1/usr/local/bin/;
mkdir build/bhcmgr_1.0-1/usr/local/share/;
mkdir build/bhcmgr_1.0-1/usr/local/share/applications/;
mkdir build/bhcmgr_1.0-1/usr/local/share/bhcmgr/;
cp -r images/ build/bhcmgr_1.0-1/usr/local/share/bhcmgr/;
cp bhcmgr build/bhcmgr_1.0-1/usr/local/bin/;
cp bhcmgr build/bhcmgr_1.0-1/usr/bin/;
cp bhcmgr.desktop build/bhcmgr_1.0-1/usr/local/share/applications/;
@chankruze
chankruze / opera-vpn.md
Created March 30, 2019 21:54 — forked from spaze/opera-vpn.md
Opera VPN behind the curtains is just a proxy, here's how it works

When setting up (that's immediately when user enables it in settings) Opera VPN sends few API requests to https://api.surfeasy.com to obtain credentials and proxy IPs, see below, also see The Oprah Proxy.

The browser then talks to a proxy de0.opera-proxy.net (when VPN location is set to Germany), it's IP address can only be resolved from within Opera when VPN is on, it's 185.108.219.42 (or similar, see below). It's an HTTP/S proxy which requires auth.

When loading a page with Opera VPN enabled, the browser sends a lot of requests to de0.opera-proxy.net with Proxy-Authorization request header.

The Proxy-Authorization header decoded: CC68FE24C34B5B2414FB1DC116342EADA7D5C46B:9B9BE3FAE674A33D1820315F4CC94372926C8210B6AEC0B662EC7CAD611D86A3 (that's sha1(device_id):device_password, where device_id and device_password come from the POST /v2/register_device API call, please note that this decoded header is from another Opera installation and thus contains

sudo apt-get install vsftpd
sudo apt-get install openssl

Generating the SSL certificate and RSA key file

openssl req -x509 -nodes -days 365 -newkey rsa:1024 --keyout /etc/vsftpd/vsftpd.pem --out /etc/vsftpd/vsftpd.pem