https://appletoolbox.com/how-to-fix-macos-mojave-battery-draining-issue/
$ pmset -g
System-wide power settings:
Currently in use:
lidwake 1
autopoweroff 1
| <?php | |
| $conf='/etc/nginx/vhosts/vhost.conf'; | |
| $confFile=fopen($conf,'w'); | |
| exec("find /var/cpanel/userdata/* -type f -not -name '*cache*' -not -name '*db' -not -name 'main' -not -name 'vhost*'",$ary); | |
| foreach ($ary as $f){ | |
| $fis=file_get_contents($f); | |
| preg_match("@\ndocumentroot..(.*)@",$fis,$ROOT); | |
| $ROOT=$ROOT[1]; | |
| preg_match("@\nip..(.*)@",$fis,$IP); | |
| $IP=$IP[1]; |
| #!/bin/bash | |
| # WARNING: 1G size ram won't work! Bitcoin "make" consumes lots of ram. Add swap first: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7 | |
| # Adapted from: https://www.ndchost.com/wiki/how-to-install-bitcoin-on-centos-7 | |
| BITCOIN_TAG="v0.18.0" | |
| # Install the EPEL repository | |
| sudo yum install -y epel-release |
| # This is an example resource file for rTorrent. Copy to | |
| # ~/.rtorrent.rc and enable/modify the options as needed. Remember to | |
| # uncomment the options you wish to enable. | |
| # Maximum and minimum number of peers to connect to per torrent. | |
| min_peers = 1 | |
| max_peers = 300 | |
| # Same as above but for seeding completed torrents (-1 = same as downloading) | |
| min_peers_seed = 1 |
| #!/bin/sh | |
| ####################################################### | |
| # | |
| # Edits the proxmox Subscription file to make it | |
| # think that it has a Subscription. | |
| # | |
| # Will disable the annoying login message about | |
| # missing subscription. | |
| # |
| <VirtualHost *:80> | |
| ServerName forum.example.com | |
| Redirect permanent / https://forum.example.com | |
| </VirtualHost> | |
| <VirtualHost *:443> | |
| ServerName forum.example.com |
https://appletoolbox.com/how-to-fix-macos-mojave-battery-draining-issue/
$ pmset -g
System-wide power settings:
Currently in use:
lidwake 1
autopoweroff 1
| #!/bin/bash | |
| set -e | |
| function usage() { | |
| cat << EOF | |
| USAGE: | |
| ./shaper start <interface> <bw as XXX kbit> | |
| ./shaper clear <interface> | |
| ./shaper show <interface> | |
| EOF |
| #!/bin/bash | |
| VERSION="1.0.2" | |
| # Interface connect to out lan | |
| INTERFACE="eth0" | |
| # Interface virtual for incomming traffic | |
| VIRTUAL="ifb0" | |
| # set the direction (1 = outgoing only, 2 = incoming only 3 = both) | |
| DIRECTION=3 | |
| # Speed |
Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.
As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.
Here's how to get it set up on Mac OS X:
OpenConnect can be installed via homebrew:
brew update
brew install openconnect
When setting these options consider the following:
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log