This file contains hidden or 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 hidden or 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 hidden or 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= |
This file contains hidden or 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
SSL | |
www -> non-www | |
RewriteRule . /index.php [L] | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] | |
----- use this | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] |
This file contains hidden or 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 insert_product ($product_data) | |
{ | |
$post = array( // Set up the basic post data to insert for our product | |
'post_author' => 1, | |
'post_content' => $product_data['description'], | |
'post_status' => 'publish', | |
'post_title' => $product_data['name'], | |
'post_parent' => '', |
This file contains hidden or 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
pm2 start ecosystem.config.js --env production_mongodb | |
scp /path/to/file username@a:/path/to/destination | |
tar -czvf foo-bar.tar.gz `find foo-bar*` | |
find ./order-export-* -maxdepth 0 -type f -delete |
This file contains hidden or 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 hidden or 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 hidden or 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); | |
} |