Skip to content

Instantly share code, notes, and snippets.

<?php
/*
Question about architecture.
This is supposed to be a simple Wordpress rest api client.
The example of one of the endpoints (users) is here: https://developer.wordpress.org/rest-api/reference/users/#example-request
to list users: GET http://demo.wp-api.org/wp-json/wp/v2/users
to create a user: POST http://demo.wp-api.org/wp-json/wp/v2/users with some required arguments

Javascript new Error().stack; output examples

<script>
  let stack = new Error().stack;
  console.log(stack);
</script>

All browsers return a string delimited by a \n.

Just in case it gets deleted :)
https://blogs.msdn.microsoft.com/scottdensmore/2004/05/25/why-singletons-are-evil/
http://steve.yegge.googlepages.com/singleton-considered-stupid
http://googletesting.blogspot.com/2008/11/clean-code-talks-global-state-and.html
https://www.alainschlesser.com/singletons-shared-instances/
http://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/
@kpion
kpion / swap-thing.md
Last active January 28, 2019 01:54
swap-thing

swap thing

result of using gui KDE Partition manager:

Job: Create file system ‘linuxswap’ on partition ‘/dev/sda2’ 
Command: mkswap /dev/sda2 
Setting up swapspace version 1, size = 4 GiB (4294963200 bytes)
no label, UUID=90a5be52-fca4-48ed-9bc0-18578ee6fb2f 
Create file system ‘linuxswap’ on partition ‘/dev/sda2’: Success