Skip to content

Fix no wifi on linux mint for old HP laptop

My old HP laptop didn’t had a very old wifi card that wasn’t supported out of the box by linux mint, but I was able to install the necessary drivers with the following code

1
2
3
4
5
6
7
sudo apt update
sudo update-pciids
sudo apt install bcmwl-kernel-source 
sudo apt install broadcom-sta-dkms
sudo apt-get install broadcom-sta-dkms
 
"/cygdrive/p/Programs/VirtualBox/VboxManage.exe" clonehd 'F:/Documents/Virtualbox/2019 Mint/2019 Mint.vdi' 'F:/Documents/Virtualbox/2019_Mint.iso' --format RAW

Custom ionic cordova plugin

create a custom-plugins folder in your ionic project, and hopefully something like this will work, lol

1
2
3
4
5
6
7
cd custom-plugins
git clone https://github.com/tgensol/cordova-plugin-facebook4
cd cordova-plugin-facebook4
npm init
cd ..
cd ..
cordova plugin add --link "F:\Documents\git\iphone_app\custom-plugins\cordova-plugin-facebook4" --variable APP_ID="300337253468881" --variable APP_NAME="JSApp"

SSH copy files

the first folder is the from directory, then the next is the

1
cp -R /share/Multimedia/Videos/ /share/USBDisk2/Backup-3_2019/Multimedia/

Then, fix the permissions:

1
chmod -R 777 /share/USBDisk2/-Backup-3_2019/

Picking ionic back up

OK, so it’s been a while and you have to pick back up from where you last left off with your ionic app. He’s how to go about that on Mac with Git.

  1. Pull from Git
  2. Run “npm install” to get all the modules
  3. Run “ionic cordova prepare” to install plugins

If you need to redo your signing, you can follow these steps

  1. Select a development team
    https://stackoverflow.com/questions/39524148/requires-a-development-team-select-a-development-team-in-the-project-editor-cod
  2. If you invalid errors, make sure your system clock has the correct date

Hopefully that did the trick and you’re ready to go, I’ll add any errors and fixes I come across to the end of the article, but here’s how to go about testing.

Emulator testing:

  1. Just run “ionic cordova emulate ios” to start it up in the emulator

Ad hoc Device testing:

  1. Open Xcode
  2. Open the iOS project, probably something like “~/Documents/app/platform/ios/App.xcworkspace”
  3. Choose Product->Build For->Testing
  4. Product->Archive
  5. Click the “Export…” button and choose Development and choose where to export the IPA
  6. Upload the IPA to diawi.com, then install on device

 

To fix “‘xcodebuild’ requires Xcode” errors

  • Run Xcode from applications directory
  • xcode-select –install # Install Command Line Tools if you haven’t already.
  • sudo xcode-select –switch /Library/Developer/CommandLineTools # Enable command line tools
  • sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Engintron and mirrors

This is pretty much the same thing as what I did in a previous post, but with Engintron vs NGINX CP.  I had to do a lot of server updates to get PHP7 running, and the process broke NGINX CP, so I had to switch to Engintron.  NGINX by itself is much more efficient than Apache, and thus far has been plenty to keep the server running even when traffic spikes.  But for special occasions I do like to have a back-up plan in case the system gets overloaded so I have a mirror set and ready to go.

To first install Engintron you can follow these instructions:

  1. cd /
  2. rm -f engintron.sh
  3. wget –no-check-certificate https://raw.githubusercontent.com/engintron/engintron/master/engintron.sh
  4. bash engintron.sh install

One thing I found out is caching is not on for dynamic pages by default, in order to turn that on go to the Enigtron interface from WHM, then click on “Edit default.conf” find this code:

1
2
 set $CACHE_BYPASS_FOR_DYNAMIC 1;
 set $CACHE_BYPASS_FOR_STATIC 0;

and set it to:

1
2
 set $CACHE_BYPASS_FOR_DYNAMIC 0;
 set $CACHE_BYPASS_FOR_STATIC 0;

“bypass_for_dynamic” will essentially turn off caching for dynamic pages, if your dynamic pages aren’t being updated very often it’s best to have caching on.  If you have a specific page that cannot by cached you can turn the bypass back on using something like this:

1
2
3
 if ($SITE_URI ~* "yourdomain.com/url_to_not_cache") {
    set $CACHE_BYPASS_FOR_DYNAMIC 1;
 }

Like previously I’m using  the split clients module to spread out traffic to a mirror.  The logic here is a bit more tricky then in NGINX CP and I only have one mirror, so the $mirror variable is just determining whether or not I’ll be redirecting that user.  The code looks essentially like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
split_clients "${remote_addr}-{$query_string}" $mirror {
   5% "y";
   * "n";
}
 
server {
 
   if ($SITE_URI ~* "domain.com") {
      set $mirror "${mirror}maindomain";
   }
   if ($http_referer = "") {
      set $mirror "n";
   }
   if ($mirror = "ymaindomain") {
      return 302 "http://mirror.yourdomain.com/";
   }
 
}

So here the split_clients will set the $mirror variable to “y” 5% of the time.  Then, if the domain is “domain.com” it will set the $mirror variable to either “ymaindomain” or “nmaindomain” and the http_referer is just stopping all direct traffic from being redirected to the mirror.  The reason I’m changing the variable is so I don’t end up mirroring subdomains, and I could use that to have different mirrors for different subdomains or specific pages.