A collection of docker online resources. Source
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| var all = []; | |
| var main = []; | |
| jQuery('.glyph div').each(function(index, div) { | |
| var name = jQuery('div.pbs').find('.mls'); | |
| var className = jQuery(name).text(); | |
| all.push(className); | |
| }); | |
| main = all[0].split(" "); | |
| main.forEach((item) => { | |
| if(item.length) { |
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
| <?php | |
| $filename = 'snippets.json'; | |
| $f = file_get_contents( $filename ); | |
| $data = json_decode( $f, true ); | |
| echo "<pre>"; | |
| convertJSONtoArray( $data, 0 ); | |
| echo "</pre>"; | |
| function convertJSONtoArray( $data, $level ) // level - уровень вложенности чтобы табуляцию писать правильную | |
| { | |
| foreach( $data as $key1 => $value1 ) |
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
| ["0"] => array ( | |
| ["name"] => "american-sign-language-interpreting", | |
| ["className"] => "fa fa-american-sign-language-interpreting", | |
| ), | |
| ["1"] => array ( | |
| ["name"] => "asl-interpreting (alias)", | |
| ["className"] => "fa fa-asl-interpreting", | |
| ), | |
| ["2"] => array ( | |
| ["name"] => "assistive-listening-systems", |
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
| Array | |
| ( | |
| [0] => Array | |
| ( | |
| [name] => american-sign-language-interpreting | |
| [className] => fa fa-american-sign-language-interpreting | |
| ) | |
| [1] => Array | |
| ( |
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
| var all = []; | |
| jQuery('#icons section').each(function(index, section) { | |
| var id = jQuery(this).attr('id'); | |
| jQuery('#'+ id + ' a').each(function(index, iconrow) { | |
| //console.log(jQuery(iconrow).text().replace('Example of ','')); | |
| var text = jQuery(iconrow).text().replace('Example of',''); | |
| all.push(text .replace(/^\s+/g, "")); | |
| console.log("array(\'name\' => \'"+ name +"\', \'className\' => \'"+iconElement.className+"\'),"); | |
| }); | |
| }); |
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
| # Node.js app Docker file | |
| FROM ubuntu:14.04 | |
| MAINTAINER Thom Nichols "thom@thomnichols.org" | |
| ENV DEBIAN_FRONTEND noninteractive | |
| RUN apt-get update | |
| RUN apt-get -qq update | |
| RUN apt-get install -y nodejs npm |
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages