A collection of programming & webdesign
Design • Adobe Photoshop
Photoshop open closed path

In Photoshop paths can be open and closed. If you have a closed path and want to reopen it, do the following:

Use the tool Covert Point (<) for direct selection, select the part of the path you want to delete and press DEL. After this the path is open.

Programming • C++
Single and double quotes

Whereas in some programming languages it doesn't matter if you use single or double quotes, it matters highly in C++ (and some others, such as Java, also). For example, if you're a webdeveloper and write a function in JavaScript, you can even mix them and it will still work and give you the right output (as long as you don't use single ones at the beginning and doubles at the end of the same string).

... read more
Programming • JavaScript
JS time format HH:mm

Just because I couldn't believe it… obviously there's no easier way in JavaScript to show the time in HH:mm (e.g. 11:05) then to build the string yourself, using if-conditions and adding the zero manually where needed:

... read more
Programming • C++
Initializing variables

While in Java, for example, you get an error if you want to run a function which contains a variable that hasn't been initialized  java: variable x might not have been initialized , not so in C++ and that can be tricky.

In C++ variables which haven't been initialized get random values which can or will almost always lead to unexpected results.

... read more
Programming • Laravel
Laravel maintenance mode

While working on a live Laravel project it might be useful to set the page in a maintenance mode, so that users visiting it, won't see any errors while work's in progress.

For this, practically just log into the server where your project is located, navigate to your project folder and there use the command  php artisan down . This sets your application in a maintenance mode. What people visiting your page then will see is a standard Laravel maintenance page.

... read more
Webdesign • HTML

Using favicons for your website or web application is a nice and handy thing. 

  1. Search the internet for a favicon generator
  2. Add your image and let it create you a bundle of favicons
... read more
Webdesign • HTML
Theme Color

To adjust the theme color of your website on a mobile phone, just add the following meta tag to your HTML <head>:

 <meta name="theme-color" content="#000000"> 

The color given in “content” will be used as theme color of your website.

Design • Adobe InDesign
InDesign: how to delete single page numbers

Page numbers in InDesign:

  1. Set page numbers on master page(s):
    1. Use text field to place and style
    2. Text > Special chars > markers
... read more
Programming • Laravel
Laravel passing several variables to view

There are several ways of passing multiple variables to a view in Laravel:

1. Using with()

... read more
Design • Adobe InDesign
InDesign useful shortcuts

Fit page in window = Ctrl + 0

Preview/Display rendering quality:

  • Ctrl + Alt + Z = normal
  • Ctrl + Alt + H = high

Switch to preview mode:

  • W : if not in text mode (to turn on and off)
    or first
  • Ctrl + Shift + A = deselect all →  then W
... read more
Webdesign • HTML
SVG polygons

Create beautiful backgrounds or forms you need with the <svg> tag using the viewBox:

viewBox values: “ min-width min-height width height ”

<svg viewBox="0 0 2000 280" preserveAspectRatio="none" width="100%" height="280">
   <polygon points="0,280 2000,280 2000,20"
            style="fill:#f9f0e6; opacity: .65"/>
Programming • Laravel
Laravel defaults xampp & mamp




... read more
Programming • Laravel
Laravel date language

Obviously, there are several methods of setting up the language of a date in Laravel. I was finally successful with the following one:

1. AppServiceProvider:

public function register()
        setlocale(LC_TIME, config('app.locale'));

... read more
Webdesign • HTML
Checkbox or radio button with clickable label

To make the label of a checkbox or radio button clickable, you can either -

  • Wrap a <label> tag around the input:
     <label><input type="checkbox" name="checkbox" value="value">some text</label> 

  • Use the id of the input field and make it match the for attribute of the label, like so:
     <input type="checkbox" name="checkbox" id="checkbox_id" value="value"> 
     <label for="checkbox_id">some text</label> 
Programming • Laravel
Laravel run app on different port

Just because I keep forgetting this command -

if you wish to open your Laravel application not on the standard 8000 port but on a different one, use this:

 php artisan serve --port=1234 

Also handy if you've got several applications running at the same time.

Webdesign • CMS
WP update order

Keeping your WP site updated is very important.

To minimize incompatibility problems when updating plugins or your WP version itself, follow this order:

... read more
Webdesign • CSS
div within div positioning

Want to position a div within another div, for example in the bottom right corner?

  • outer div: set  position: relative; 
  • inner div: set  position: absolute;  and then with top, bottom, right, left where you want to place it

This also works if the outer div is part of a flex-box.

Programming • Laravel
Different uses of with() in Laravel

In Laravel you can use the with() method to pass data to a view for example.

But there are different ways of this with() method as for how the passed parameters are treated by the system in the view they've been passed to:

... read more
Programming • Laravel
Laravel routes

Something important when creating routes in Laravel is never to use routes consisting of variables only. Make them unique, like so -

Don't:  /{id}/{title} 

Do:  /cat/{id}/{title} 

Programming • Laravel
Laravel resources via public

What do you put in resources, what in public?

The resources folder:

  • css
  • js (new files have to be included in webpackmix file, too)

Access via:  ("../js/yourfile.js") 

... read more