Shortcut | Description |
---|---|
<C-r><C-w> |
Insert current word into the command line |
<C-r>\" |
Paste from " register |
<C-x><C-f> |
Auto-completion of path in insert mode |
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
export class Fish { | |
constructor() { | |
this.pos = createVector(R.random_num(0, W), R.random_num(0, H)); // Position vector of fish | |
this.poi = createVector(0, 0); // Position vector of interest | |
this.vel = createVector(R.random_dec() * M, R.random_dec() * M); // initialize velocity in unit vector | |
this.facing = this.vel.heading() // facing of fish | |
this.speed = R.random_num(0.3, 1) * M; // magnitude to scale vel | |
this.maxTurn = PI / R.random_int(512, 1024); | |
this.fl = round(R.random_int(175, 225) * M); | |
this.laziness = R.random_int(1, 1000); |
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
version: '3.7' | |
services: | |
web: | |
image: nginx:alpine | |
ports: | |
- "8000:80" | |
volumes: | |
- ./app:/usr/share/nginx/html |
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
version: "3" | |
services: | |
redis: | |
image: redis:alpine | |
ports: | |
- "6379" | |
networks: | |
- frontend | |
deploy: |
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
<!doctype html> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta property="og:title" content=""> | |
<meta property="og:type" content=""> |
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
window.addEventListener('dragover', function(e) { | |
e.stopPropagation(); | |
e.preventDefault(); | |
}); | |
window.addEventListener('drop', function(e) { | |
e.stopPropagation(); | |
e.preventDefault(); | |
if(e.dataTransfer.files.length === 0) { | |
return alert("Seems like you tried to drag-and-drop an image from another browser window? You need to download the image to your computer (right-click, then save image) and then drag-and-drop the downloaded image. Sorry!"); |
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
// Requiring lodash library | |
const _ = require('lodash'); | |
// Using _.debounce() method | |
// with its parameters | |
var debounce_fun = _.debounce(function () { | |
console.log('Function debounced after 1000ms!'); | |
}, 1000); | |
debounce_fun(); |
$ npm install mocha
$ mkdir test
$ $EDITOR test/test.js # or open with your favorite editor
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
The position property specifies the type of positioning method used for an element (static, relative, fixed, absolute or sticky). | |
- Position: `position: static | relative | absolute | fixed | sticky` | |
- Position Properties: `top | right | bottom | left ` | |
- Float Element: `float: left | right | none` | |
- Clear Floating Elements: `clear: none | left | right | both` | |
- Index: `z-index: 3 | auto | inherit` | |
[CSS Cheat Sheet](https://simplecheatsheet.com/tag/css-cheat-sheet/) |
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
[ | |
{ | |
"name": "Ethereum Mainnet", | |
"rpc": [ | |
"https://cloudflare-eth.com" | |
], | |
"shortName": "ethereum-mainnet" | |
}, | |
{ | |
"name": "OP Mainnet", |
NewerOlder