UPDATE (2021-03-31): I've posted an improved version of this guide with newer versions of the software.
I hate when my images turn out like this:
| <?php | |
| /* We can use the pre_get_posts action hook to modify a query before it's run. | |
| * http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts*/ | |
| add_action( 'pre_get_posts', 'kvn_rem_pp' ); | |
| function kvn_rem_pp($query){ | |
| if(current_user_can ('read_private_posts') ){ | |
| /*restrict to the posts page main query. | |
| *All other views (eg. category archives) unnaffected | |
| *http://codex.wordpress.org/Function_Reference/is_home | |
| *http://codex.wordpress.org/Function_Reference/is_main_query*/ |
| curl --include \ | |
| --no-buffer \ | |
| --header "Connection: Upgrade" \ | |
| --header "Upgrade: websocket" \ | |
| --header "Host: example.com:80" \ | |
| --header "Origin: http://example.com:80" \ | |
| --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
| --header "Sec-WebSocket-Version: 13" \ | |
| http://example.com:80/ |
| <?php | |
| /** | |
| * Hide shipping rates when free shipping is available. | |
| * Updated to support WooCommerce 2.6 Shipping Zones. | |
| * | |
| * @param array $rates Array of rates found for the package. | |
| * @return array | |
| */ | |
| function my_hide_shipping_when_free_is_available( $rates ) { | |
| $free = array(); |
| _BUCKET_NAME="foo.example.com" | |
| _POLICY=$(cat <<EOT | |
| { | |
| "Version":"2012-10-17", | |
| "Statement":[{ | |
| "Sid":"PublicReadForGetBucketObjects", | |
| "Effect":"Allow", | |
| "Principal": "*", | |
| "Action":["s3:GetObject"], |
| import * as request from 'request'; | |
| import * as fs from 'fs'; | |
| import * as readline from 'readline'; | |
| var google = require('googleapis'); | |
| var googleAuth = require('google-auth-library'); | |
| /*************** STEPS | |
| - made a project on https://console.cloud.google.com/cloudpubsub/topicList?project=testmabs thing? |
| package dumptransport | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "net/http/httputil" | |
| ) | |
| type DumpTransport struct { | |
| r http.RoundTripper |
| DUMP | |
| // pod-name name of the postgres pod | |
| // postgres-user database user that is able to access the database | |
| // database-name name of the database | |
| kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql | |
| RESTORE | |
| // pod-name name of the postgres pod | |
| // postgres-user database user that is able to access the database | |
| // database-name name of the database |
UPDATE (2021-03-31): I've posted an improved version of this guide with newer versions of the software.
I hate when my images turn out like this:
| # !!! IMPORTANT | |
| # Must point to the correct director or this entire script breaks | |
| eval $(/opt/homebrew/bin/brew shellenv) | |
| # The next line updates PATH for the Google Cloud SDK. | |
| if [ -f '/usr/local/google-cloud-sdk/path.bash.inc' ]; then . '/usr/local/google-cloud-sdk/path.bash.inc'; fi | |
| # The next line enables shell command completion for gcloud. | |
| if [ -f '/usr/local/google-cloud-sdk/completion.bash.inc' ]; then . '/usr/local/google-cloud-sdk/completion.bash.inc'; fi |
| #!/bin/bash | |
| # | |
| # WARNING: CPU MINING IS UNPROFITABLE! (FOR HOBBY / EXPERIMENT / RESEARCH ONLY) | |
| # | |
| # RASPBERRY PI CPUMINER-MULTI SETUP SCRIPT | |
| # | |
| # RASPBERRY PI, DOGE, DOGECOIN, PROHASHING.COM, LITECOIN, MINING | |
| # |