This file contains hidden or 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 isDarkColor(color) { | |
const luminance = (0.299 * color[0] + 0.587 * color[1] + 0.114 * color[2]) / 255; | |
return luminance <= 0.5; | |
} | |
function hexToRgb(hex) { | |
const r = parseInt(hex.substring(1, 3), 16); | |
const g = parseInt(hex.substring(3, 5), 16); | |
const b = parseInt(hex.substring(5, 7), 16); |
This file contains hidden or 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
/** | |
* Get domain from string url | |
* @param {*} url | |
* @returns string | |
*/ | |
export const getDomain = url => { | |
const urlParts = getApiUrl(url) | |
.split('/') | |
.slice(0, 3) |
This file contains hidden or 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 Certutil | |
$ apt install libnss3-tools -y | |
Install mkcert | |
$ wget https://github.com/FiloSottile/mkcert/releases/download/v1.1.2/mkcert-v1.1.2-linux-amd64 | |
$ mv mkcert-v1.1.2-linux-amd64 mkcert | |
$ chmod +x mkcert | |
$ cp mkcert /usr/local/bin/ |
This file contains hidden or 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
docker exec -i CONTAINER_ID mysql -uroot -proot DB_NAME < BACKUP_DB.sql |
This file contains hidden or 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
kill -9 `ps ax | grep node | grep meteor | awk '{print $1}'` |
This file contains hidden or 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
#php7.2 to php7.4 | |
if now in php7.2 | |
=> sudo update-alternatives --set php /usr/bin/php7.4 | |
#php7.4 to php7.2 | |
if now in php7.4 | |
=> sudo update-alternatives --set php /usr/bin/php7.2 |
This file contains hidden or 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
Try to run : | |
flutter config --android-sdk /home/[YOUR_USER]/Android/Sdk | |
if you get this error | |
flutter doctor | |
Doctor summary (to see all details, run flutter doctor -v): | |
[✓] Flutter (Channel stable, 1.20.3, on Linux, locale en_US.UTF-8) | |
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2) | |
✗ Android licenses not accepted. To resolve this, run: flutter doctor |
This file contains hidden or 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
# Show date | |
gsettings set org.gnome.desktop.interface clock-show-date true | |
#Show clock seconds | |
gsettings set org.gnome.desktop.interface clock-show-seconds true | |
#Show weekday | |
gsettings set org.gnome.desktop.interface clock-show-weekday true |
This file contains hidden or 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
$sudo apt install php7.2-mysql | |
OR | |
$sudo apt install php5.6-mysql | |
Change php5.6-mysql with the version you want |
This file contains hidden or 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
$ sudo apt install curl php-cli php-mbstring git unzip php-xml |