Javascript chrome full screen mode
document.documentElement.webkitRequestFullscreen();
25 июля 2019, 10:20
document.documentElement.webkitRequestFullscreen();
loop: for(let i=0; i<10; i++) { for(let j=0; j<10; j++){ console.log(i,j); if(j === 5) break loop; } }
const v8 = require('v8'); const structuredClone = obj => { return v8.deserialize(v8.serialize(obj)); };
sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
# Using Ubuntu curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash - sudo apt-get install -y nodejs
'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, 'options' => [ \PDO::ATTR_PERSISTENT => true ] ],
SELECT CONCAT(ROUND(KBS/POWER(1024, IF(PowerOf1024<0,0,IF(PowerOf1024>3,0,PowerOf1024)))+0.49999), SUBSTR(' KMG',IF(PowerOf1024<0,0, IF(PowerOf1024>3,0,PowerOf1024))+1,1)) recommended_innodb_buffer_pool_size FROM (SELECT SUM(data_length+index_length) KBS FROM information_schema.tables WHERE engine='InnoDB') A, (SELECT 2 PowerOf1024) B;
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>limit.maxproc</string> <key>ProgramArguments</key> <array> <string>launchctl</string> <string>limit</string> <string>maxproc</string> <string>2048</string> <string>2048</string> </array> <key>RunAtLoad</key> <true /> <key>ServiceIPC</key> <false /> </dict> </plist>sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>limit.maxfiles</string> <key>ProgramArguments</key> <array> <string>launchctl</string> <string>limit</string> <string>maxfiles</string> <string>524288</string> <string>524288</string> </array> <key>RunAtLoad</key> <true/> <key>ServiceIPC</key> <false/> </dict> </plist>
sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist reboot ulimit -n
To increase or decrease /dev/shm filesystem size 1) Open /etc/fstab with vi or any text editor of your choice, 2) Locate the line of /dev/shm and use the tmpfs size option to specify your expected size, e.g. 512MB: tmpfs /dev/shm tmpfs defaults,size=512m 0 0 e.g. 2GB: tmpfs /dev/shm tmpfs defaults,size=2g 0 0 The /etc/fstab content format is documented in man fstab and the tmpfs filesystem options can be found in man mount 3) To make change effective immediately, run this mount command to remount the /dev/shm filesystem: mount -o remount /dev/shm
ssh -f -N -L 9906:127.0.0.1:3306 user@database.example.com
Host tunnel HostName database.example.comm IdentityFile ~/.ssh/id_rsa LocalForward 9906 127.0.0.1:3306 User root
$ ssh -f -N tunnel
hdiutil convert -format UDRW -o destination_file.img source_file.iso diskutil list diskutil partitionDisk /dev/disk2 1 "Free Space" "unused" "100%" sudo dd if=destination_file.img.dmg of=/dev/disk2 bs=1m
pkg-static upgrade -f
<?php function getUuid() { // http://stackoverflow.com/questions/2040240/php-function-to-generate-v4-uuid // by Andrew Moore (http://www.php.net/manual/en/function.uniqid.php#94959) return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', // 32 bits for "time_low" mt_rand(0, 0xffff), mt_rand(0, 0xffff), // 16 bits for "time_mid" mt_rand(0, 0xffff), // 16 bits for "time_hi_and_version", // four most significant bits holds version number 4 mt_rand(0, 0x0fff) | 0x4000, // 16 bits, 8 bits for "clk_seq_hi_res", // 8 bits for "clk_seq_low", // two most significant bits holds zero and one for variant DCE1.1 mt_rand(0, 0x3fff) | 0x8000, // 48 bits for "node" mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) ); }
ALTER USER 'script'@'localhost' PASSWORD EXPIRE NEVER
brew reinstall --build-from-source php70-intl
sudo mdutil -i on sudo rm -rf /.Spotlight-V100
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
git push --mirror