"learn the basics/roots first" principle applies to pretty much everything in life. From learning a new programming language to starting a new sport. It requires a lot of practice, but once you master it, the only thing left to do is to get creative with it. And that's where the real fun begins.
Initiative for creating easy auto scripts Snippets are reusable with little or no changes . If you are new to programming or simply interested in learning different scripts, here are some resources you can use.
😊 Feel free to contribute, fork, star
# debugging to specific point in code in python code
# add specific code
import pdb
pdb.set_trace
# and run
py.test
or
py.test --capture=no
# Enable two monitor in i3
xrandr --output HDMI1 --auto --right-of eDP1
- echo %PATH%
- setx PATH "%PATH%;C:/path-upto-scripts"
- Gangs of Four
- python patterns
- https://sourcemaking.com/design_patterns -Tracing code execution django python Andrew Mead - Testing Nodejs Application
The best way to do code testing is by using Test-Driven Development (TDD).
This is how it works:
Write a test. – The test will flesh out some functionality in your app.
run the test – The test should fail, since there's no code to make it pass.
Write the code – To make the test pass
Run the test – If it passes, you are confident that the code you've written meets the test requirements
Refactor code – Remove duplication, prune large objects and make the code more readable. Re-run the tests every time you refactor the code
Repeat – That's it!
- https://github.com/MindorksOpenSource/android-developer-roadmap
- https://medium.com/mindorks/learning-android-development-in-2019-a-practical-guide-ddc71e008696
Wipe out all the data from pendrive
sudo dd if=/dev/zero of=/dev/sdb1 bs=1k count=2048
VanillaJS is the same as pure Javascript.
Vanilla in slang means:
unexciting, normal, conventional, boring
- create ~/.vimrc
- set mouse=a # helps in mouse action
-
copy from vim to outside vim
- make sure
set mouse=a
is enabled in.vimrc
- while copying make sure to press shift and then
ctrl+shift+c
to copy
- make sure
-
Split screen
- Open file
- :Sex /path/to/file
- :Vex /path/to/file
- navigate between screen
- ctrl+w+v
- ctrl+w+l
- ctrl+w+h
- ctrl+w+s
- ctrl+w+j
- ctrl+w+k
- Change screen size
- ctrl+w+">"
- ctrl+w+"<"
- ctrl+w+"+"
- ctrl+w+"="
- Open file
-
Copy/Paste
- enter to visual mode with ctrl+v
- select the block up to which you want to copy and move cursor with h,j,k,l
- cut (with d) or copy (with y)
- paste with either p or P
-
Editing
- undo/redo
- u: undo last change
- ctrl+r
- undo/redo
-
reference
Network Penetration Testing for Beginner https://www.youtube.com/watch?v=L6SlXzk3Efo
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
- Standalone business application: This is your typical application, and is like applications like Word, Excel, Outlook and more. Anything that can be used by someone to make their work more efficient would fall into this category.
- Client-Server Application: This is an application that runs on the computer but accesses information from a remote server.
- Collaborative Application: This is an application that is designed to help people involved in a common task. This is a way for people to work together at once, using the same application on each of their computers.
- Utilities and Plug-Ins: Anything that can help a computer or browser run more efficiently would fall into this category.
- System Apps and Services: Anything that allows the computer to run various other applications would fall into this category.
- Multimedia Applications: This is an application that plays podcasts, movies, video, music and more. iTunes is a good example of this.
- Network Applications: Anything that runs over a network falls into this category.
- connect with lan cable between two computer
- install, enable, start ssh service
- also compulsary to add password in linux machine
- ping ssh with
ping ipaddress
- ssh remote linux with
ssh ipaddress
scp -r /file path/to/copy user@ipaddress:/path/to/paste
ls -lh
//list path with human readable file size
-
https://www.archlinux.org/packages/extra/x86_64/libwebp/ (archlinux)
-
command to convert webp to png:
cwebp -q 80 image.png -o image.webp
-
command to convert png to webp:
dwebp image.webp -o image.png
Use aliases. Though there aren't any native Git one-liners, you can define your own as
git config --global alias.clone-branches '! git branch -a | sed -n "/\/HEAD /d; /\/master$/d; /remotes/p;" | xargs -L1 git checkout -t'
and then use it as
git clone-branches
Authorized JavaScript origins = http://localhost:8000
Authorized redirect URIs = http://localhost:8000/complete/google-oauth2/
npm install -g serve
serve -s dist
- manage nameserver default is,
ns1: ohodomain.earth.orderbox-dns.com
ns2: ohodomain.mars.orderbox-dns.com
ns3: ohodomain.mercury.orderbox-dns.com
ns4: ohodomain.venus.orderbox-dns.com
with
dns1.p04.nsone.net
dns2.p04.nsone.net
dns3.p04.nsone.net
dns4.p04.nsone.net
- manage dns with type A record ip: 104.198.14.52
- domain forward with destination nepex.netlify.com
npm install push-dir --save-dev
In package.json, "deploy": "push-dir --dir=dist --branch=gh-pages --cleanup",
npm run generate
npm run deploy
- while update, unable to lock database
- sudo rm /var/lib/pacman/db.lck
For optimal user experience, material design user interfaces should adapt layouts for the following breakpoint widths: 480, 600, 840, 960, 1280, 1440, and 1600dp.
For installing bundler system-wide. To do this, you need to pass --no-user-install flag to gem and execute it with sudo:
sudo gem install bundler --no-user-install
Stack Overflow
bundle install
bundle exec jekyll serve
ngrok http 8080 -host-header="localhost:8080"
yarn upgrade-interactive --latest
yarn upgrade --latest
sudo yaourt -S ttf-indic-otf
redis-server --daemonize yes
ps aux | grep redis-server
sudo usermod -a -G docker $USER
npm install -g serve
serve -s dist
gem executables will not run.
- You need to have Ruby and Compass installed and in your system PATH for this task to work.
export PATH="/home/ryan1/.gem/ruby/1.9.1/bin:$PATH"
When commenting a line, move the cursor to the next line Use geddski.macros extension:
-
Add macro to settings.json -- "macros": { "commentLine": ["editor.action.commentLine","cursorDown"] }
-
Map a key in keybindings.json (use you own favorite key combo) -- { "key": "ctrl+/", "command": "macros.commentLine", "when": "editorTextFocus && !editorReadonly" }