-
Add
restricted
component repositorysudo add-apt-repository restricted
-
Update packages list
sudo apt-get update
-
Confirm that you have kernel headers installed and updated
sudo apt-get install linux-generic
-
Then install it again
sudo apt-get install bcmwl-kernel-source
linux
Using Token as authentication for websocket | django == 4.0.3 | channels == 3.0.4
Submitted by stephenwenceslao on Fri, 03/04/2022 - 16:36Using Token as authentication for websocket
Version:
django == 4.0.3 channels == 3.0.4
Important notice: must declare first before, AuthMiddlewareStack.
import os import django os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings') django.setup() from channels.auth import AuthMiddlewareStack
1.Add middleware.py in your django app.
Create daphne asgi + websocket | Django | ubuntu 20.04
Submitted by stephenwenceslao on Wed, 03/02/2022 - 12:46!important is to first install redis server
sudo apt install redis
Create daphne ASGI
must allow whatever port you set
How I create multiple django site for subdomain1 and subdomain2, using gunicorn + nginx + systemd | ubuntu 20.04 | DigitalOcean
Submitted by stephenwenceslao on Fri, 02/25/2022 - 17:58Prerequisite:
1.Can run gunicorn on your env
gunicorn --bind 0.0.0.0:9001 myapp.wsgi2.Added subdomain on droplet networking. 3.Root access. 4.Install certbot nginx
sudo apt install certbot python3-certbot-nginx.
Create multiple django site for subdomain1 and subdomain2, using gunicorn + nginx + systemd | DigitalOcean.
1.Make sure you already installed the gunicorn on your django env
pip install gunicorn
2.Create new socket file on
sudo nano /etc/systemd/system/gunicorn_subdomain1.socket
Ubuntu 18.04lts slow boot time even using SSD
Submitted by stephenwenceslao on Sat, 12/28/2019 - 14:17My problem was the network was running so slow to detect.
This is my pc specs:
I reduce the time for this to process to save time at boot.
I edited networking.services
sudo nano /etc/systemd/system/network-online.target.wants/networking.service
Change
TimeoutStartSec=5min
To
TimeoutStartSec=2s
Then reboot.
How to install wifi on Ubuntu
Submitted by stephenwenceslao on Wed, 06/12/2019 - 10:23Steam OS on Ubuntu 18.04 LTS
Submitted by stephenwenceslao on Sun, 05/19/2019 - 21:44Alright Dota 2 perfectly working on my Ubuntu 18.04LTS ( AMD PC ).
How to mount your iphone with IOS 10 up using linux OS
Submitted by stephenwenceslao on Sat, 03/09/2019 - 11:53For iOS10 it only show the "Apps" folder.
If you don't even have that, please do:
idevicepair unpair
idevicepair pair
Do the last one multiple times until successful (follow the hints on screen)
Finally reboot your computer.
Now, you will not have access to your media still. It must be a simple bug because it can be solved with:
mkdir ~/Desktop/iOSmount
ifuse ~/Desktop/iOSmount
Note that you will need root permissions to unmount this:
Linux CentOs LAMP
Submitted by stephenwenceslao on Thu, 01/18/2018 - 12:45Install update
$ sudo yum update
Install apache
Install apache
$ sudo yum install httpd
Start apache
$ sudo systemctl start httpd.service
Set apache to start on boot
$ sudo systemctl enable httpd.service
Set firewall
$ sudo firewall-cmd --add-service=http --permanent
Install MySQL
Install MySQL
$ sudo yum install mariadb-server mariadb
Start MySQL
$ sudo systemctl start mariadb
Set MySQL to start on boot
Linux UBUNTU server setup
Submitted by stephenwenceslao on Thu, 08/24/2017 - 21:22Run the update
$ sudo apt-get update
Install Apache
$ sudo apt-get install apache2
Install mysql
$ sudo apt-get install mysql-server
Install php
$ sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
Install php-xml
$ sudo apt-get install php-xml
Install cups
$ sudo apt-get install cups cups-bsd
Install unoconv
$ sudo apt-get install unoconv
Install ssh
$ sudo apt-get install openssh-server
Install Voice speak
Raspberry pi clone on linux
Submitted by stephenwenceslao on Mon, 07/24/2017 - 09:29Backup Raspberry Pi SD Card
1. Insert the SD card in your PC using a USB or built-in card reader. Now open a Terminalwindow, and enter the command sudo fdisk -l
. This will list all the filesystems present on your system.
2. Try to find out the device name of your SD card. I have a 16GB SD card, so it is easily identified as the device /dev/sdb
which has a size of 14.9GB. This is because the actual storage on a device is always slightly lower than advertised. Note down this device name.
Raspberry pi install printer on raspbian lite
Submitted by stephenwenceslao on Sat, 07/22/2017 - 22:27Install cups on your raspberry pi (raspbian lite)
$ sudo apt-get install cups cups-bsd
Set your hostname on cups configuration
$ sudo nano /etc/cups/cupsd.conf
To remotely control your printer using webpage (cups):
$ cupsctl --remote-admin
To test printing on command line
$ lp -d printer_name ~/my/file/destination/test.doc
Vagrant update php version in Debian Wheezy
Submitted by stephenwenceslao on Fri, 05/26/2017 - 11:56edit file sources.list
$ sudo nano /etc/apt/sources.list
add
deb http://packages.dotdeb.org wheezy all deb-src http://packages.dotdeb.org wheezy all deb http://packages.dotdeb.org wheezy-php56-zts all deb-src http://packages.dotdeb.org wheezy-php56-zts all
Then run
$ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get install php5
To reset MYSQL root password:
$ sudo dpkg-reconfigure mysql-server-5.5
Grant all privileges to a user
$ GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'%' WITH GRANT OPTION;
Docker set up on linux mint
Submitted by stephenwenceslao on Mon, 05/15/2017 - 09:26Install docker
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
$ sh -c 'echo deb https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list'
$ sudo apt-get update
$ sudo apt-get purge lxc-docker
$ sudo apt-get install linux-image-extra-$(uname -r)
$ sudo apt-get install docker-engine
$ sudo service docker start
$ sudo usermod -aG docker $USER
Install docker-compose
Linux basic commands
Submitted by stephenwenceslao on Thu, 05/04/2017 - 09:33Check size directories
$ du -sh *
Search file
$ sudo find [path] -name "[filename]"
Unzip tar.gz using tar command
$ tar -xvzf filename.tar.gz
f: this must be the last flag of the command, and the tar file must be immediately after. It tells tar the name and path of the compressed file.
z: tells tar to decompress the archive using gzip
x: tar can collect files or extract them. x does the latter.
Drush export/import database
Submitted by stephenwenceslao on Wed, 05/03/2017 - 14:47Drupal 6 and 7
$ drush cc
$ drush sql-dump > ~/my-sql-dump-file-name.sql
Drupal 8
$ drush cr
$ drush sql-dump > ~/my-sql-dump-file-name.sql
Download Database from the server
$ scp username@example.com:~/my-sql-dump-file-name.sql ~/projects
Import Database
$ drush sql-drop
$ drush sql-cli < ~/my-sql-dump-file-name.sql
Set up my local environment using Linux-mint
Submitted by stephenwenceslao on Mon, 03/06/2017 - 14:20Install GIT
$ sudo add-apt-repository ppa:git-core/ppa $ sudo apt-get update $ sudo apt-get install git
set up your email and username
$ git config --global user.email "you@example.com"
$ git config --global user.name "Your Name"
Install Sublime
Open a terminal with Ctrl+Alt+T and type:
$ sudo add-apt-repository ppa:webupd8team/sublime-text-2 $ sudo apt-get update
Optional: remove any installed Sublime Text packages: