Ausgangslage: Synchroner Code. Einfach zu lesen, klarer Programmablauf:
const ergebnis1 = synchroneFunktion1();
const ergebnis2 = synchroneFunktion2();
tueWasMitErgebnis(ergebnis1, ergebnis2);
let pancakeSwapAbi = [ | |
{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"}, | |
]; | |
let tokenAbi = [ | |
{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}, | |
]; | |
const Web3 = require('web3'); | |
/* | |
Required Node.js |
/* | |
Data Class | |
* * * * * * * | |
Author: Gkiokan | |
Comment: | |
Encode and Decode Your String / Object / Array with utf-8 force. | |
*/ | |
class Data { | |
// Encode |
# To enable CORS you should add lines with CORS rules below to your valet.conf file | |
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx | |
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory | |
# after you edit your valet.conf do not forget to execute `valet restart` | |
server { | |
listen 80 default_server; | |
root /; | |
charset utf-8; | |
client_max_body_size 128M; |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^domain\.com$ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !^/wp-admin | |
RewriteCond %{REQUEST_URI} !^/wp-json | |
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] |
echo " > Loading Aliases " | |
# Basics | |
alias ..="cd .." | |
alias lsa="ls -al" | |
alias swatch="sass --watch " | |
alias sfull="sass --watch sass:css --style=compressed" | |
alias sf="sfull" | |
alias m="~/.dotfiles/mount.sh" | |
alias s="source ~/.dotfiles/server.sh" |
<?php | |
/** | |
* Programmatically install and activate wordpress plugins | |
* | |
* Usage: | |
* 1. Edit the $pluginSlugs array at the beginning of this file to include the slugs of all the | |
* plugins you want to install and activate | |
* 2. Upload this file to the wordpress root directory (the same directory that contains the | |
* 'wp-admin' directory). | |
* 3. Navigate to <your-domain-wordpress-root>/install-wp-plugins.php (If wordpress is installed |
#!/bin/sh | |
# homebrew taps | |
brew tap caskroom/cask | |
brew tap caskroom/versions | |
brew tap homebrew/boneyard | |
brew tap caskroom/fonts | |
# Updated grep |
// Adding current user to www-data | |
sudo adduser $USER www-data | |
//change ownership to user:www-data and | |
sudo chown $USER:www-data -R /var/www/html | |
sudo chmod u=rwX,g=srX,o=rX -R /var/www/html | |
// change file permissions of existing files and folders to 755/644 | |
sudo find /var/www/html -type d -exec chmod g=rwxs "{}" \; |