Difference between revisions of "Main Page"
Jump to navigation
Jump to search
| (21 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | = 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: | ||
| + | <pre> | ||
| + | # example 1 | ||
| + | curl.exe --output index.html --url https://superuser.com | ||
| + | # example 2 | ||
| + | curl.exe -o index.html https://superuser.com | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | PowerShell | ||
| + | <pre> | ||
| + | # example 1 | ||
| + | Invoke-WebRequest -OutFile index.html -Uri https://superuser.com | ||
| + | # example 2 | ||
| + | iwr -outf index.html https://superuser.com | ||
| + | </pre> | ||
| + | ===Opening ports=== | ||
| + | <pre> | ||
| + | netsh firewall set portopening ALL 137 “Hyper-V Management” | ||
| + | </pre> | ||
| + | Another way to open port | ||
| + | <pre> | ||
| + | New-NetFirewallRule -DisplayName 'My port' -Profile 'Private' -Direction Inbound -Action Allow -Protocol TCP -LocalPort 6624 | ||
| + | </pre> | ||
| + | |||
| + | 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: | ||
| + | <pre> | ||
| + | gpupdate /force | ||
| + | </pre> | ||
| + | |||
=<span style="color: #0000ff">Back-end/Frontend stuff</span>= | =<span style="color: #0000ff">Back-end/Frontend stuff</span>= | ||
*[https://github.com/fawick/speedtest-resize Is Go faster than ImageMagic?] Resizing images benchmark | *[https://github.com/fawick/speedtest-resize Is Go faster than ImageMagic?] Resizing images benchmark | ||
*[https://regex101.com/ Regex online testing] | *[https://regex101.com/ Regex online testing] | ||
| + | |||
| + | |||
| + | ==Git== | ||
| + | stop asking for password: | ||
| + | <pre>> git config credential.helper store</pre> | ||
| + | |||
| + | Delete all local branches except <strong>master</strong> and <strong>dev</strong> | ||
| + | <pre>> git branch | grep -vE "(master|dev)" | xargs git branch -D</pre> | ||
==Laravel PHP== | ==Laravel PHP== | ||
| − | + | ===User Auth=== | |
*[[Create User using artisan tinker]] | *[[Create User using artisan tinker]] | ||
| − | How to test SMTP from command line: | + | ===How to test SMTP from command line:=== |
<pre>php artisan tinker</pre> | <pre>php artisan tinker</pre> | ||
| Line 34: | Line 84: | ||
</pre> | </pre> | ||
| − | =Web Design= | + | ==Mysql== |
| + | Create database and assign user to it | ||
| + | |||
| + | <pre> | ||
| + | > CREATE DATABASE unoduos; | ||
| + | > CREATE USER 'unoduos'@'localhost' IDENTIFIED BY 'password'; | ||
| + | > GRANT ALL PRIVILEGES ON unoduos. * TO 'unoduos'@'localhost'; | ||
| + | > FLUSH PRIVILEGES; | ||
| + | </pre> | ||
| + | |||
| + | =<span style="color: #0000ff">Web Design</span>= | ||
*[https://demos.creative-tim.com/material-bootstrap-wizard/wizard-build-profile.html Nice User registration form example] | *[https://demos.creative-tim.com/material-bootstrap-wizard/wizard-build-profile.html Nice User registration form example] | ||
| Line 42: | Line 102: | ||
*[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://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! | ||
| − | =Server configuration= | + | *[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] <- has Vue version as well. (used by Klook) [https://idangero.us/swiper/demos/310-thumbs-gallery-loop.html Example] | ||
| + | |||
| + | =<span style="color: #0000ff">Server configuration</span>= | ||
*[[Maillog is empty on Centos 7]] | *[[Maillog is empty on Centos 7]] | ||
| + | ===No password ssh=== | ||
| + | <pre> | ||
| + | ssh-keygen -t rsa | ||
| + | ssh-copy-id -i ~/.ssh/id_rsa.pub root@joyscoot.com -p 2223 | ||
| + | </pre> | ||
| + | |||
| + | *[[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<br> | ||
| + | <home dir> <username> | ||
| + | <pre> | ||
| + | > useradd -m -d /opt/username username | ||
| + | </pre> | ||
| + | |||
| + | Specific ID<br> | ||
| + | <uid> <username> | ||
| + | <pre> | ||
| + | > useradd -u 1500 username | ||
| + | </pre> | ||
| + | |||
| + | Specific group<br> | ||
| + | <groupname> <username> | ||
| + | <pre> | ||
| + | > useradd -g users username | ||
| + | </pre> | ||
| + | |||
| + | More groups<br> | ||
| + | <pre> | ||
| + | useradd -g users -G wheel,developers username | ||
| + | </pre> | ||
| + | |||
| + | Example of creatin' a user with expiration date | ||
| + | <pre> | ||
| + | > useradd -m -d /var/www/website.com eagroup -G nginx -c "Temporary developer account" -e 2019-11-22 -s /bin/bash | ||
| + | </pre> | ||
| − | =Mobile Development= | + | =<span style="color: #0000ff">Mobile Development</span>= |
*[https://flutter.dev/ Flutter made by Google] | *[https://flutter.dev/ Flutter made by Google] | ||
| − | =Developer tricks, IDE, configuration, etc= | + | =<span style="color: #0000ff">Developer tricks, IDE, configuration, etc</span>= |
| − | =Games development, Modding= | + | =<span style="color: #0000ff">Games development, Modding</span>= |
==Fallout 3+ Modding== | ==Fallout 3+ Modding== | ||
Latest revision as of 02:17, 1 October 2021
Contents
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:
# example 1 curl.exe --output index.html --url https://superuser.com # example 2 curl.exe -o index.html https://superuser.com
PowerShell
# example 1 Invoke-WebRequest -OutFile index.html -Uri https://superuser.com # example 2 iwr -outf index.html https://superuser.com
Opening ports
netsh firewall set portopening ALL 137 “Hyper-V Management”
Another way to open port
New-NetFirewallRule -DisplayName 'My port' -Profile 'Private' -Direction Inbound -Action Allow -Protocol TCP -LocalPort 6624
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:
gpupdate /force
Back-end/Frontend stuff
- Is Go faster than ImageMagic? Resizing images benchmark
- Regex online testing
Git
stop asking for password:
> git config credential.helper store
Delete all local branches except master and dev
> git branch | grep -vE "(master|dev)" | xargs git branch -D
Laravel PHP
User Auth
How to test SMTP from command line:
php artisan tinker
Then run the command (specify your own email):
>>>> Mail::send('errors.404',[], function($message) { $message->to('shir****@gmail.com')->subject('testing email'); });
MongoDB tricks
Database
MongoDB
BACKUP
xBackup is example of backup directory
> mongodump --db <USER> --out ./xBackup/ --username tws --password "<PASSWD>"
RESTORE
> mongorestore --username <USER> --password "<PASSWD>" --authenticationDatabase <AUTH DB> ./xBackup/
Mysql
Create database and assign user to it
> CREATE DATABASE unoduos; > CREATE USER 'unoduos'@'localhost' IDENTIFIED BY 'password'; > GRANT ALL PRIVILEGES ON unoduos. * TO 'unoduos'@'localhost'; > FLUSH PRIVILEGES;
Web Design
- 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!
Carousel
Server configuration
No password ssh
ssh-keygen -t rsa ssh-copy-id -i ~/.ssh/id_rsa.pub root@joyscoot.com -p 2223
Create unix user
Home dir
<home dir> <username>
> useradd -m -d /opt/username username
Specific ID
<uid> <username>
> useradd -u 1500 username
Specific group
<groupname> <username>
> useradd -g users username
More groups
useradd -g users -G wheel,developers username
Example of creatin' a user with expiration date
> useradd -m -d /var/www/website.com eagroup -G nginx -c "Temporary developer account" -e 2019-11-22 -s /bin/bash