This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TEMPORARY TABLE ALL_ORDERS_IN_GIVEN_TIMEFRAME ( | |
SELECT ALL_ORDERS_IN_GIVEN_TIMEFRAME_PLAIN.order_item_id, ALL_ORDERS_IN_GIVEN_TIMEFRAME_PLAIN.product_name, ALL_ORDERS_IN_GIVEN_TIMEFRAME_PLAIN.post_date, meta_value AS email FROM (SELECT ITEMS.order_item_id, ITEMS.order_item_name AS product_name, ITEMS.order_id, MAIN_POSTS.post_date FROM wp_mokkamerch_posts AS MAIN_POSTS | |
JOIN wp_PREFIX_woocommerce_order_items AS ITEMS ON MAIN_POSTS.ID = ITEMS.order_id | |
WHERE DATE(MAIN_POSTS.post_date) BETWEEN "2016-12-01" AND "2017-01-01" AND (MAIN_POSTS.post_status = "wc-completed" OR MAIN_POSTS.post_status = "wc-production") AND ITEMS.order_item_type = "line_item") AS ALL_ORDERS_IN_GIVEN_TIMEFRAME_PLAIN | |
JOIN wp_PREFIX_postmeta AS MAIN_POSTMETA ON ALL_ORDERS_IN_GIVEN_TIMEFRAME_PLAIN.order_id = MAIN_POSTMETA.post_id AND MAIN_POSTMETA.meta_key = "_billing_email" AND MAIN_POSTMETA.meta_value <> 'EXCLUDE@SERVICE-EMAIL.com' | |
); | |
CREATE TEMPORARY TABLE ITEMMETA_SUMMARY ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $ALL_ORDERS_IN_GIVEN_TIMEFRAME = $wpdb->query('CREATE TEMPORARY TABLE ALL_ORDERS_IN_GIVEN_TIMEFRAME (SELECT ALL_ORDERS_IN_GIVEN_TIMEFRAME_PLAIN.order_item_id, ALL_ORDERS_IN_GIVEN_TIMEFRAME_PLAIN.product_name, ALL_ORDERS_IN_GIVEN_TIMEFRAME_PLAIN.post_date, meta_value AS email FROM (SELECT ITEMS.order_item_id, ITEMS.order_item_name AS product_name, ITEMS.order_id, MAIN_POSTS.post_date FROM wp_PREFIX_posts AS MAIN_POSTS JOIN wp_PREFIX_woocommerce_order_items AS ITEMS ON MAIN_POSTS.ID = ITEMS.order_id WHERE DATE(MAIN_POSTS.post_date) BETWEEN "2016-12-01" AND "2017-01-01" AND (MAIN_POSTS.post_status = "wc-completed" OR MAIN_POSTS.post_status = "wc-production") AND ITEMS.order_item_type = "line_item") AS ALL_ORDERS_IN_GIVEN_TIMEFRAME_PLAIN JOIN wp_PREFIX_postmeta AS MAIN_POSTMETA ON ALL_ORDERS_IN_GIVEN_TIMEFRAME_PLAIN.order_id = MAIN_POSTMETA.post_id AND MAIN_POSTMETA.meta_key = "_billing_email" AND MAIN_POSTMETA.meta_value <> "service@mokka-merch.com");'); | |
$ITEMMETA_SUMMARY = $wpdb->query('CREATE TE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function waitForElementToAppear(selector, time) { | |
if(document.querySelector(selector)!=null) { | |
alert("The element is displayed, you can put your code instead of this alert."); | |
return; | |
} | |
else { | |
setTimeout(function() { | |
waitForElementToAppear(selector, time); | |
}, time); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo nano /etc/nginx/sites-enabled/default | |
# HTTP — redirect all traffic to HTTPS | |
server { | |
listen 80; | |
listen [::]:80 default_server ipv6only=on; | |
return 301 https://$host$request_uri; | |
} | |
# HTTPS — proxy all requests to the Node app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.createUser( | |
{ | |
user: "XXX", | |
pwd: "XXX", | |
roles: [ { role: "root", db: "admin" } ] | |
} | |
) | |
mongoimport -u 'ACTUALUSERNAME' -p 'PASSWORD' --authenticationDatabase admin -d DATABASE -c COLLECTION --type csv --file FILEPATH.csv --headerline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install -g vue-cli | |
vue init pwa my-project | |
cd my-project | |
npm install | |
npm run dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="text" id="searchUniversity" class="form-control" placeholder="HU Berlin"> | |
<div id="universities-container"> | |
<% universities.forEach(function(single) { %> | |
<div class="single-university-container <%= single.title %>"> | |
<div class="row"> | |
<div class="col-md-12 col-xs-12"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title" : "code-university", | |
"name" : "Code University", | |
"logo" : "code_university.png", | |
"link" : "https://code.berlin", | |
"infos" : "<p>test</p>", | |
"trusteeship" : "privat", | |
"study_programs" : { | |
"Informatik" : [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SOURCE: http://proger.i-forge.net/%D0%9A%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80/[20121112]%20The%20smallest%20transparent%20pixel.html | |
data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs= |
OlderNewer