See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| <?php | |
| /* Cria arrays definindo as letras e valores de chave */ | |
| $letras = array(); | |
| $letras[1] = 'a'; | |
| foreach(range('b','z') AS $letra) { | |
| array_push($letras, $letra); | |
| } | |
| foreach(range('A','Z') AS $letra) { |
| add_action( 'woocommerce_thankyou', 'woocommerce_reduce_order_stock' ); | |
| function woocommerce_reduce_order_stock( $order_id ) { | |
| global $woocommerce; | |
| if ( !$order_id ) | |
| return; | |
| $order = new WC_Order( $order_id ); | |
| $order->reduce_order_stock(); | |
| } |
| # Linha para corrigir problema de SSL no Nginx | |
| #Editar o arquivo | |
| vim /etc/nginx/nginx.conf | |
| #E adicionar essa linha: | |
| ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA; | |
| # Apois isso reiniciar o Nginx |
| apt-get install msmtp ca-certificates | |
| vim /etc/msmtprc | |
| # Set defaults. | |
| defaults | |
| # Enable or disable TLS/SSL encryption. | |
| tls on | |
| tls_starttls on | |
| tls_trust_file /etc/ssl/certs/ca-certificates.crt |
| # VPS with 1G RAM | |
| # Soluction, add swap ;-) | |
| sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 | |
| sudo /sbin/mkswap /var/swap.1 | |
| sudo /sbin/swapon /var/swap.1 |
CUDA 12.1.1 toolkit is gonna offer to install Nvidia driver 530 for us. It's from New Feature branch. It's likely to be newer than the default Nvidia driver you would've installed via apt-get (apt would prefer to give you 525, i.e. Production Branch).
If you're confident that you already have a new enough Nvidia driver for CUDA 12.1.1, and you'd like to keep your driver: feel free to skip this "uninstall driver" step.
But if you're not sure, or you know your driver is too old: let's uninstall it. CUDA will install a new driver for us later.