Description of what the REST endpoint does.
- GET
| #Update system | |
| sudo apt-get update | |
| sudo apt-get upgrade -y | |
| #Install Apache2 | |
| sudo apt-get install apache2 -y | |
| sudo a2enmod rewrite | |
| sudo service apache2 restart | |
| #Install PHP |
Description of what the REST endpoint does.
| import pymysql | |
| connection = pymysql.connect(host='<ip-or-domain>', | |
| user='<dbuser>', | |
| password='<dbpass>', | |
| db='<dbname>', | |
| charset='utf8mb4', | |
| cursorclass=pymysql.cursors.DictCursor, | |
| autocommit=True) |
| function findElementsLargerThanScreen() { | |
| var elements = document.querySelectorAll('*') | |
| for (var i = 0; i < elements.length; i++) { | |
| var elementWidthInt = 0; | |
| var elementWidth = window.getComputedStyle(elements[i], null).width | |
| if (elementWidth !== 'auto') { | |
| elementWidthInt = parseFloat(elementWidth.replace('px', '')); | |
| if (elementWidthInt > screen.width) { | |
| console.log(elementWidthInt) | |
| } else { |
| 1. install mysql, apache2, php-cli, php | |
| - apt-get install php7.0-cli | |
| - apt-get install php7.0 libapache2-mod-php7.0 php7.0-gd php7.0-xml php7.0-mysql | |
| - apt-get install apache2 apache2-doc apache2-utils | |
| - apt-get install mysql-server | |
| - apt-get install zip unzip | |
| - apt-get install mailutils # setup required | |
| 3. download d8 |
| # note: Must install pymysql: `pip3 install pymysql` | |
| import pymysql | |
| conn= pymysql.connect(host='localhost',user='root',password='password',db='s1',charset='utf8mb4',cursorclass=pymysql.cursors.DictCursor) | |
| a=conn.cursor() | |
| sql='CREATE TABLE `users` (`id` int(11) NOT NULL AUTO_INCREMENT,`email` varchar(255) NOT NULL,`password` varchar(255) NOT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;' | |
| a.execute(sql) |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ruleset name="BAD GAZELLE"> | |
| <description>Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/ | |
| </description> | |
| <arg name="tab-width" value="2"/> | |
| <rule ref="Generic.Classes.DuplicateClassName"/> | |
| <rule ref="Generic.CodeAnalysis.EmptyStatement"/> | |
| <rule ref="Generic.CodeAnalysis.JumbledIncrementer"/> | |
| <rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/> | |
| <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/> |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <input type="text" id="input"> | |
| <pre id="output"></pre> |
| <?php | |
| <?php | |
| $query = new EntityFieldQuery(); | |
| $entities = $query->entityCondition('entity_type', 'node') | |
| ->entityCondition('bundle', 'event') | |
| ->propertyCondition('status', 1) | |
| ->fieldCondition('field_date', 'value', array('2011-03-01', '2011-03-31'), 'BETWEEN') | |
| ->fieldOrderBy('field_date', 'value', 'ASC') | |
| ->execute(); |
| { | |
| "always_show_minimap_viewport": true, | |
| "bold_folder_labels": true, | |
| "caret_extra_bottom": 1, | |
| "caret_extra_top": 1, | |
| "caret_extra_width": 1, | |
| "caret_style": "blink", | |
| "color_scheme": "Packages/Boxy Theme/schemes/Boxy Monokai.tmTheme", | |
| "fade_fold_buttons": false, | |
| "font_face": "hermit", |