from: http://www.zend.com/en/resources/php7_infographic
compared to php 5.6, php 7 is 2x faster, consumes 30% less memory and can handle up to 3x times more requests
| start = moment().hour(6).minute(0); | |
| output = []; | |
| for (i=1; i<33; i++) { | |
| from = start.format('h:mm') | |
| to = start.add('30', 'm').format('h:mm'); | |
| output.push(`#${i}: ${from}-${to} - `); | |
| } | |
| console.log(output.join("\n")); |
from: http://www.zend.com/en/resources/php7_infographic
compared to php 5.6, php 7 is 2x faster, consumes 30% less memory and can handle up to 3x times more requests
| #! /bin/bash | |
| for s in $(cat sites.txt); do | |
| ip=$(ping -c 1 $s | gawk -F'[()]' '/PING/{print $2}') | |
| echo "$s: $ip" | |
| done |
| :: Open Windows PowerShell in Administrative mode and run this file, i.e., ./install-choco-script.bat | |
| @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
| :: Install Applications | |
| choco install vcredist2010 -fy | |
| choco install flashplayerplugin -fy | |
| choco install k-litecodecpackfull -fy | |
| choco install ffmpeg -fy | |
| choco install jre8 -fy | |
| choco install javaruntime -fy |
Getting started:
Related tutorials:
| #!/bin/bash | |
| # Script will output dumps for all databases using seperate files | |
| # Derived from this post: http://www.cyberciti.biz/faq/ubuntu-linux-mysql-nas-ftp-backup-script/ | |
| USER="user" | |
| PASSWORD="password" | |
| HOST="localhost" | |
| MYSQL="$(which mysql)" | |
| MYSQLDUMP="$(which mysqldump)" | |
| OUTPUT_DIR="/backups/files" |
| #!/bin/sh | |
| ## backup each mysql db into a different file, rather than one big file | |
| ## as with --all-databases. This will make restores easier. | |
| ## To backup a single database simply add the db name as a parameter (or multiple dbs) | |
| ## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is | |
| ## Create the user and directories | |
| # mkdir -p /var/backups/mysql/databases | |
| # useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup | |
| ## Remember to make the script executable, and unreadable by others |
From: https://en.wikipedia.org/wiki/Timeline_of_programming_languages
| Year | Language | Developer/Company | Predecessor(s) |
|---|---|---|---|
| 1969 | B | Ken Thompson, with contributions from Dennis Ritchie | BCPL |
| 1972 | Smalltalk | Alan Kay, Adele Goldberg, Dan Ingalls, Xerox PARC | Simula 67 |
| 1972 | C | Dennis Ritchie | B, BCPL, ALGOL 68 |
| 1983 | Objective-C | Brad Cox | Smalltalk, C |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>