Note: I configured this thinkfan setup for my old Thinkpad w520 on Ubuntu 17.10.
Install lm-sensors and thinkfan.
sudo apt-get install lm-sensors thinkfan
| #!/bin/bash | |
| # Create the CSV file with header | |
| echo "url,username,password" > credentials.csv | |
| # Define a string of possible characters for the password | |
| char_pool="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" | |
| counter=0 | |
| for i in {a..z}; do |
| // Get $order object from $email | |
| $order = $email->object; | |
| // Now you have access to (see above)... | |
| if ( $order ) { | |
| $order->get_id(); | |
| $order->get_formatted_order_total( ); | |
| // etc. |
| <?php | |
| $args = array( | |
| 'post_status'=>'publish', | |
| 'post_type'=>array(TribeEvents::POSTTYPE), | |
| 'posts_per_page'=>10, | |
| //order by startdate from newest to oldest | |
| 'meta_key'=>'_EventStartDate', | |
| 'orderby'=>'_EventStartDate', | |
| 'order'=>'DESC', |
| # Trellis Database Backup script for all bedrock folders. | |
| # Use case backup all db before destroy vagrant and create. | |
| # need to run from trellis folder on terminal | |
| vagrant ssh | |
| cd /srv/www | |
| find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}'/current && mkdir -p db_backup && wp db export db_backup/database_`date +%Y%m%d`.sql " \; |
https://github.com/rg3/youtube-dl/
apt-get install libav-tools ffmpeg # Linux (either one of either should do) brew install ffmpeg # OSX choco install ffmpeg # Windows
| <?php | |
| /* | |
| * https://remicorson.com/woocommerce-stripe-add-custom-metadata/ | |
| * Add "Billing Company" value to Stripe metadata | |
| * add this to function.php | |
| */ | |
| function filter_wc_stripe_payment_metadata( $metadata, $order, $source ) { | |
| $order_data = $order->get_data(); |
| <?php | |
| /** | |
| * Gravity Wiz // Gravity Forms // Validate that a Value Exists | |
| * | |
| * Ensure that a value entered in Form A has been previously submitted on Form B. This is useful if you're generating a reference number of some sort | |
| * on Form B and would like the user to enter it on Form A. | |
| * | |
| * @version 1.8 | |
| * @author David Smith <[email protected]> | |
| * @license GPL-2.0+ |
| 1. Create a new directory; | |
| mkdir Apple\ Enterprise | |
| cd Apple\ Enterprise | |
| 2. Generate a certificate signing request | |
| openssl req -nodes -newkey rsa:2048 -keyout aps.key -out CertificateSigningRequest.certSigningRequest | |
| 3. With the information like so (ensure you give it a password): | |
| Country Name (2 letter code) [AU]:GB | |
| State or Province Name (full name) [Some-State]:London |
| # BEGIN WordPress | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.php [L] |