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
# INSTALL | |
# cp tmuxconf ~/.tmux.conf | |
# | |
# Set prefix key to c-f instead of default c-b | |
unbind C-b | |
set -g prefix C-f | |
bind C-f send-prefix | |
set-option -g default-shell /bin/zsh |
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
FLUTTER | |
MacOS install | |
Download SDK | |
cd ~/development | |
$ unzip ~/Downloads/flutter_macos_v1.7.8+hotfix.3-stable.zip | |
export PATH="$PATH:`pwd`/flutter/bin" |
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
JS - Measuring JavaScript Functions’ Performance | |
Performance has always played a crucial part in software. On the web, performance is even more important as our users can easily change website and visit one of our competitors if we offer them slow pages. As professional web developers, we have to take this issue into account. A lot of old web performance optimization best practices, such as minimizing requests, using a CDN and not writing rendering blocking code, still apply today. However, as more and more web apps are using JavaScript, it’s important to verify that our code is fast. | |
Suppose that you have a working function but you suspect it’s not as fast as it could be, and you have a plan to improve it. How do you prove this assumption? What’s the best practice for testing the performance of JavaScript functions today? Generally, the best way to achieve this task is to use the built-in performance.now() function and measure the time before and after your function executes. | |
In this article we’ll discuss h |
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
VISUAL STUDIO CODE - SETTINGS JSCONFIG | |
{ | |
"compilerOptions": { | |
"outDir": "build/dist", | |
"module": "commonjs", | |
"target": "es5", | |
"lib": ["es6", "dom"], | |
"sourceMap": true, | |
"jsx": "react", |
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
CORE => LINUX TERMINAL, MAC | |
MASTER THE COMMANDS | |
TERMINAL SHORCUTS CHEATSHEET | |
https://github.com/0nn0/terminal-mac-cheatsheet | |
KILL PROCESS | |
killall appname | |
kill PID |
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
Common File Permissions | |
Setting Numerical Meaning | |
-rw------- (600) Only the owner has read and write permissions. | |
-rw-r--r-- (644) Only the owner has read and write permissions; the group and others have read only. | |
-rwx------ (700) Only the owner has read, write, and execute permissions. | |
-rwxr-xr-x (755) The owner has read, write, and execute permissions; the group and others have only read and execute. | |
-rwx--x--x (711) The owner has read, write, and execute permissions; the group and others have only execute. | |
-rw-rw-rw- (666) Everyone can read and write to the file. (Be careful with these permissions.) | |
-rwxrwxrwx (777) Everyone can read, write, and execute. (Again, this permissions setting can be hazardous.) |
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
CORE => UBUNTU ON LIGHTSAIL - NGINX AS WEB SERVER & REVERSE PROXY FOR APACHE | |
sudo ufw enable | |
sudo ufw allow OpenSSH | |
INSTALL APACHE & PHP-FPM | |
sudo apt update | |
sudo apt install apache2 php-fpm | |
wget https://mirrors.edge.kernel.org/ubuntu/pool/multiverse/liba/libapache-mod-fastcgi/libapache2-mod-fastcgi_2.4.7~0910052141-1.2_amd64.deb |
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
CORE => UBUNTU - ESSENTIALS STEPS | |
================================================================ | |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @@@@@ | |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
Offending ECDSA key in /Users/rick/.ssh/known_hosts:5 | |
READ LINE TO CONFIRM |
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
resourceMap = { | |
"a": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
"b": [11, 12], | |
"c": [21, 23], | |
"d": [54, 55, 56, 57, 510] | |
}; | |
var reverseMap = {}; | |
for(var propName in resourceMap) | |
{ |
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
function romanize(num) { | |
var lookup = {M:1000,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}, | |
roman = '', | |
i; | |
for ( i in lookup ) { | |
while ( num >= lookup[i] ) { | |
roman += i; | |
num -= lookup[i]; | |
} | |
} |
NewerOlder