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
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
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/ |
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 | |
/* | |
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 |
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
# when you installed the Tree Style Tab in your Firefox Quantum or any newer, | |
# you don't need the FX's Tab Bar anymore, therefore: | |
1. Click help -> Troubleshooting Information -> next to "Profile Directory " click "Open Directory". | |
(if you can't see the menu, click the "wrench" icon on the right, then Help and Troubleshooting Information ) | |
2. Create (if not exists) a "chrome" directory | |
3. Create (if not exists) "userChrome.css" file and edit it |
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
public function defaultMethod() { | |
lib::$view->assign("pageTemplate", $this->templateDir."cities.tpl"); | |
$cityId = 2; | |
$defaultCityIds = '2, 3, 7, 12'; | |
$cityIds = null; | |
if (isset($_GET['city']) && !empty($_GET['city'])) { | |
$cityId = $_GET['city']; | |
$cityIds = $_GET['city']; | |
}else{ |
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
df -h /dev/sdc1 | |
Filesystem Size Used Avail Use% Mounted on | |
/dev/sdc1 699G 692G 6,8G 100% /media/konrad/Elements |
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
bind ^S savefile main | |
bind ^F whereis main | |
bind F3 findnext main | |
#bind esc cancel main | |
bind ^X cut main | |
bind ^C copytext main | |
bind ^V uncut main |
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
How to get PHP errors to log/display | |
TL;DR: | |
Put/modify this in the php.ini file: | |
error_reporting = -1 | |
display_errors = On | |
Long version: |
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
adfadfadsf |
NewerOlder