<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
  <siteinfo>
    <sitename>Vladimir Mitrofanov personal wiki</sitename>
    <dbname>shirker_net</dbname>
    <base>https://wiki.shirker.net/index.php?title=Main_Page</base>
    <generator>MediaWiki 1.33.0</generator>
    <case>first-letter</case>
    <namespaces>
      <namespace key="-2" case="first-letter">Media</namespace>
      <namespace key="-1" case="first-letter">Special</namespace>
      <namespace key="0" case="first-letter" />
      <namespace key="1" case="first-letter">Talk</namespace>
      <namespace key="2" case="first-letter">User</namespace>
      <namespace key="3" case="first-letter">User talk</namespace>
      <namespace key="4" case="first-letter">Vladimir Mitrofanov personal wiki</namespace>
      <namespace key="5" case="first-letter">Vladimir Mitrofanov personal wiki talk</namespace>
      <namespace key="6" case="first-letter">File</namespace>
      <namespace key="7" case="first-letter">File talk</namespace>
      <namespace key="8" case="first-letter">MediaWiki</namespace>
      <namespace key="9" case="first-letter">MediaWiki talk</namespace>
      <namespace key="10" case="first-letter">Template</namespace>
      <namespace key="11" case="first-letter">Template talk</namespace>
      <namespace key="12" case="first-letter">Help</namespace>
      <namespace key="13" case="first-letter">Help talk</namespace>
      <namespace key="14" case="first-letter">Category</namespace>
      <namespace key="15" case="first-letter">Category talk</namespace>
    </namespaces>
  </siteinfo>
  <page>
    <title>Main Page</title>
    <ns>0</ns>
    <id>1</id>
    <revision>
      <id>60</id>
      <parentid>59</parentid>
      <timestamp>2021-10-01T02:17:49Z</timestamp>
      <contributor>
        <username>Shirker</username>
        <id>1</id>
      </contributor>
      <comment>/* Windows and HyperV */</comment>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text xml:space="preserve" bytes="4450">= Windows and HyperV =
===HyperV remote management===
https://timothygruber.com/hyper-v-2/remotely-managing-hyper-v-server-in-a-workgroup-or-non-domain/

===Download from CMD===
cURL
Windows 10 includes curl.exe:

so you can do something like this:
&lt;pre&gt;
# example 1
curl.exe --output index.html --url https://superuser.com
# example 2
curl.exe -o index.html https://superuser.com
&lt;/pre&gt;


PowerShell
&lt;pre&gt;
# example 1
Invoke-WebRequest -OutFile index.html -Uri https://superuser.com
# example 2
iwr -outf index.html https://superuser.com
&lt;/pre&gt;
===Opening ports===
&lt;pre&gt;
netsh firewall set portopening ALL 137 “Hyper-V Management”
&lt;/pre&gt;
Another way to open port
&lt;pre&gt;
New-NetFirewallRule -DisplayName 'My port' -Profile 'Private' -Direction Inbound -Action Allow -Protocol TCP -LocalPort 6624
&lt;/pre&gt;

All ports required for Hyperv(all need to be opened in order to connect via internet):
https://www.altaro.com/hyper-v/network-ports-related-hyper-v/


update GPO:
&lt;pre&gt;
  gpupdate /force
&lt;/pre&gt;

=&lt;span style="color: #0000ff"&gt;Back-end/Frontend stuff&lt;/span&gt;=
*[https://github.com/fawick/speedtest-resize Is Go faster than ImageMagic?] Resizing images benchmark
*[https://regex101.com/ Regex online testing]


==Git==
stop asking for password:
&lt;pre&gt;&gt; git config credential.helper store&lt;/pre&gt;

Delete all local branches except &lt;strong&gt;master&lt;/strong&gt; and &lt;strong&gt;dev&lt;/strong&gt;
&lt;pre&gt;&gt; git branch | grep -vE "(master|dev)" | xargs git branch -D&lt;/pre&gt;

==Laravel PHP==
===User Auth===
*[[Create User using artisan tinker]]

===How to test SMTP from command line:===
&lt;pre&gt;php artisan tinker&lt;/pre&gt;

Then run the command (specify your own email):
&lt;pre&gt;&gt;&gt;&gt;&gt; Mail::send('errors.404',[], function($message) { $message-&gt;to('shir****@gmail.com')-&gt;subject('testing email'); });&lt;/pre&gt;


===MongoDB tricks===
*[[Creating User model to work with MongoDB]]
*[https://github.com/jenssegers/laravel-mongodb Mongo DB extension for Laravel]

=&lt;span style="color: #0000ff"&gt;Database&lt;/span&gt;=

==MongoDB==

=== BACKUP === 

xBackup is example of backup directory
&lt;pre&gt;
&gt; mongodump --db &lt;USER&gt;  --out ./xBackup/ --username tws --password "&lt;PASSWD&gt;"
&lt;/pre&gt;

=== RESTORE ===
&lt;pre&gt;
&gt; mongorestore  --username &lt;USER&gt; --password "&lt;PASSWD&gt;" --authenticationDatabase &lt;AUTH DB&gt;  ./xBackup/
&lt;/pre&gt;

==Mysql==
Create database and assign user to it

&lt;pre&gt;
&gt; CREATE DATABASE unoduos;
&gt; CREATE USER 'unoduos'@'localhost' IDENTIFIED BY 'password';
&gt; GRANT ALL PRIVILEGES ON unoduos. * TO 'unoduos'@'localhost';
&gt; FLUSH PRIVILEGES;
&lt;/pre&gt;

=&lt;span style="color: #0000ff"&gt;Web Design&lt;/span&gt;=

*[https://demos.creative-tim.com/material-bootstrap-wizard/wizard-build-profile.html Nice User registration form example]

*[https://css2sass.herokuapp.com/ CSS to SCSS convertor]

*[https://codeburst.io/how-to-create-horizontal-scrolling-containers-d8069651e9c6 How To Create Horizontal Scrolling Containers] A good working solution with FLEX. I do believe doesn't work in IE, BUT the good thing there is no mobile IE in mobile phones!

*[https://codepen.io/viktorstrate/pen/yoBRLy CSS skeleton gradient animation]

==Carousel==

*[https://github.com/nolimits4web/Swiper/blob/master/demos/310-thumbs-gallery-loop.html Swiper] &lt;- has Vue version as well. (used by Klook) [https://idangero.us/swiper/demos/310-thumbs-gallery-loop.html Example]

=&lt;span style="color: #0000ff"&gt;Server configuration&lt;/span&gt;=

*[[Maillog is empty on Centos 7]]

===No password ssh===
&lt;pre&gt;
ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub root@joyscoot.com -p 2223
&lt;/pre&gt;

*[[Setting up ssh server with .pem authentication]]

===Create unix user===

[https://linuxize.com/post/how-to-create-users-in-linux-using-the-useradd-command/ read more]

Home dir&lt;br&gt;
&lt;home dir&gt; &lt;username&gt;
&lt;pre&gt;
&gt; useradd -m -d /opt/username username
&lt;/pre&gt;

Specific ID&lt;br&gt;
&lt;uid&gt; &lt;username&gt;
&lt;pre&gt;
&gt; useradd -u 1500 username
&lt;/pre&gt;

Specific group&lt;br&gt;
&lt;groupname&gt; &lt;username&gt;
&lt;pre&gt;
&gt; useradd -g users username
&lt;/pre&gt;

More groups&lt;br&gt;
&lt;pre&gt;
useradd -g users -G wheel,developers username
&lt;/pre&gt;

Example of creatin' a user with expiration date 
&lt;pre&gt;
&gt; useradd -m -d /var/www/website.com eagroup -G nginx -c "Temporary developer account" -e 2019-11-22 -s /bin/bash
&lt;/pre&gt;

=&lt;span style="color: #0000ff"&gt;Mobile Development&lt;/span&gt;=

*[https://flutter.dev/ Flutter made by Google]

=&lt;span style="color: #0000ff"&gt;Developer tricks, IDE, configuration, etc&lt;/span&gt;=

=&lt;span style="color: #0000ff"&gt;Games development, Modding&lt;/span&gt;=

==Fallout 3+ Modding==</text>
      <sha1>4dtmqizmduzbrm9eigayhaf1tpv5upm</sha1>
    </revision>
  </page>
</mediawiki>
