Skip to content

Instantly share code, notes, and snippets.

View BKeanu1989's full-sized avatar

Kevin Fechner BKeanu1989

View GitHub Profile
@BKeanu1989
BKeanu1989 / add-wc-products-programmatically.php
Last active March 14, 2024 15:30
adding woocommerce productgs programmatically/ via code
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' => '',
@BKeanu1989
BKeanu1989 / htaccess redirect
Last active August 30, 2017 15:26
apache redirects
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]
@BKeanu1989
BKeanu1989 / Empty 1x1 pixel-img
Last active July 17, 2017 17:45
empty 1x1 pixel
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=
@BKeanu1989
BKeanu1989 / vue js pwa
Created June 28, 2017 07:44
vue js pwa
npm install -g vue-cli
vue init pwa my-project
cd my-project
npm install
npm run dev
{
"title" : "code-university",
"name" : "Code University",
"logo" : "code_university.png",
"link" : "https://code.berlin",
"infos" : "<p>test</p>",
"trusteeship" : "privat",
"study_programs" : {
"Informatik" : [
{
@BKeanu1989
BKeanu1989 / filterableList.ejs
Created July 3, 2017 09:25
filterAble List via Javascript
<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">
@BKeanu1989
BKeanu1989 / robots.txt
Created July 25, 2017 10:40
disallow everything
User-agent: *
Disallow: /
@BKeanu1989
BKeanu1989 / gist:b978e1420e3a5a29459493e68b744a82
Created August 7, 2017 16:04
copy directory into itself(subdirectory)
rsync -Rr ./Desktop/ ./Desktop/sub/
@BKeanu1989
BKeanu1989 / gist:1bb7da31040935fb7a30ed42a6779886
Created August 12, 2017 18:11
copy directory to inner directory
rsync --recursive MAINFOLDER/* MAINFOLDER/sandbox
@BKeanu1989
BKeanu1989 / To-learn.txt
Last active April 24, 2018 16:13
The things I want to learn next.
Vue JS
Basics - Check
Nuxt
PWA
bascics - check
"High Scalable Servers"
Reverse Proxy - check