Skip to content

Instantly share code, notes, and snippets.

View david-strejc's full-sized avatar

David Strejc david-strejc

  • Prague
View GitHub Profile
#!/usr/bin/env python3
import requests
import json
# Define your API key here. Replace "your-api-key" with your actual API key.
api_key = "your-api-key"
# Define the ChatGPT API endpoint.
url = "https://api.openai.com/v1/engines/davinci-codex/completions"
#!/usr/bin/env python3
import requests
import json
# Define your API key here. Replace "your-api-key" with your actual API key.
api_key = "your-api-key"
# Define the ChatGPT API endpoint.
url = "https://api.openai.com/v1/engines/davinci-codex/completions"
add_action( 'elementor/frontend/after_register_styles',function() {
foreach( [ 'solid', 'regular', 'brands' ] as $style ) {
wp_deregister_style( 'elementor-icons-fa-' . $style );
}
}, 20 );
add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );
//* Disable FontAwesome
add_action( 'woocommerce_single_product_summary', 'wpd_woo_taxonomy_images', 20 );
function wpd_woo_taxonomy_images() {
echo apply_filters( 'taxonomy-images-list-the-terms', '', array(
'before' => '<div class="my-custom-class-name">',
'after' => '</div>',
'before_image' => '<span>',
'after_image' => '</span>',
'taxonomy' => 'product_cat',
) );
add_shortcode( 'field_name', function () {
$values = get_field('field_name');
if($values)
{
echo '<ul>';
foreach($values as $value)
{
echo '<li>' . $value . '</li>';
add_action('woocommerce_thankyou_bacs', 'wpd_qr_code', 10, 1 );
function wpd_qr_code( $order_id ) {
$order = wc_get_order( $order_id );
$bacs_info = get_option( 'woocommerce_bacs_accounts');
echo "<div style='display: grid; grid-template-columns: auto auto auto;'>";
foreach ($bacs_info as $info ) {
time="2015-07-28T07:18:12Z" level=error msg="error authorizing context: authorization header with basic token required" http.request.host="172.30.160.216:5000" http.request.id=3a12faaf-5e25-42cc-bfeb-64e9a7a74195 http.request.method=GET http.request.remoteaddr="10.1.0.1:47004" http.request.uri="/v2/" http.request.useragent="docker/1.6.2 go/go1.4.2 kernel/3.10.0-229.7.2.el7.x86_64 os/linux arch/amd64" instance.id=fcfa1f8b-3279-4f7e-878a-6ce1c1f66612
time="2015-07-28T12:11:49Z" level=error msg="error authorizing context: authorization header with basic token required" http.request.host="172.30.160.216:5000" http.request.id=4301981d-5d56-4916-8ac2-360a0393235c http.request.method=GET http.request.remoteaddr="10.1.0.1:39128" http.request.uri="/v2/" http.request.useragent="docker/1.6.2 go/go1.4.2 kernel/3.10.0-229.7.2.el7.x86_64 os/linux arch/amd64" instance.id=fcfa1f8b-3279-4f7e-878a-6ce1c1f66612
time="2015-07-28T12:11:49Z" level=error msg="error authorizing context: authorization header with basic token requir
root @ master-1 /root ### ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1454 qdisc pfifo_fast state UP qlen 1000
link/ether 02:00:0a:0a:00:bf brd ff:ff:ff:ff:ff:ff
inet 10.10.0.191/24 brd 10.10.0.255 scope global ens3
10.1.0.1 - - [28/Jul/2015:12:11:49 +0000] "GET /v2/ HTTP/1.1" 401 114 "" "docker/1.6.2 go/go1.4.2 kernel/3.10.0-229.7.2.el7.x86_64 os/linux arch/amd64"
10.1.0.1 - - [28/Jul/2015:12:11:49 +0000] "GET /v2/ HTTP/1.1" 401 114 "" "docker/1.6.2 go/go1.4.2 kernel/3.10.0-229.7.2.el7.x86_64 os/linux arch/amd64"
time="2015-07-28T12:11:49Z" level=debug msg="authorizing request" http.request.host="172.30.160.216:5000" http.request.id=a566cfd3-ffa1-447c-8812-70d3487a88b3 http.request.method=GET http.request.remoteaddr="10.1.0.1:39134" http.request.uri="/v2/" http.request.useragent="docker/1.6.2 go/go1.4.2 kernel/3.10.0-229.7.2.el7.x86_64 os/linux arch/amd64" instance.id=fcfa1f8b-3279-4f7e-878a-6ce1c1f66612
time="2015-07-28T12:11:49Z" level=error msg="error authorizing context: authorization header with basic token required" http.request.host="172.30.160.216:5000" http.request.id=a566cfd3-ffa1-447c-8812-70d3487a88b3 http.request.method=GET http.request.remoteaddr="10.1.0.1:39134" http.request.uri="/v2/" http.request.usera
10.1.0.1 - - [28/Jul/2015:06:46:46 +0000] "POST /v2/dst/cakephp-mysql-example/blobs/uploads/ HTTP/1.1" 202 0 "" "docker/1.6.2 go/go1.4.2 kernel/3.10.0-229.7.2.el7.x86_64 os/linux arch/amd64"
time="2015-07-28T06:46:47Z" level=debug msg="authorizing request" http.request.host="172.30.160.216:5000" http.request.id=58454a1c-6060-4397-b45e-73ce88e3c1e7 http.request.method=PUT http.request.remoteaddr="10.1.0.1:44762" http.request.uri="/v2/dst/cakephp-mysql-example/blobs/uploads/ca9d2f4e-8218-40bc-89b2-3a1805062b52?_state=zqvRgzF6V0tKTSq-CJ23xTiymMY9HYbLglTZhPk0rwJ7Ik5hbWUiOiJkc3QvY2FrZXBocC1teXNxbC1leGFtcGxlIiwiVVVJRCI6ImNhOWQyZjRlLTgyMTgtNDBiYy04OWIyLTNhMTgwNTA2MmI1MiIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxNS0wNy0yOFQwNjo0Njo0Ny4wODEwMTI1MTVaIn0%3D&digest=sha256%3A6ecef2978e168a7120f9f7ac9d78199084829f528e76770cca6a885c9155b5ab" http.request.useragent="docker/1.6.2 go/go1.4.2 kernel/3.10.0-229.7.2.el7.x86_64 os/linux arch/amd64" instance.id=fcfa1f8b-3279-4f7e-878a-6ce1c1f66612 vars.name="dst/cakephp-mysql-example" v