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
| ## Credits to John Lieske - https://www.ansible.com/blog/getting-started-writing-your-first-playbook | |
| --- | |
| - name: Install nginx | |
| hosts: all | |
| become: true | |
| tasks: | |
| - name: Add epel-release repo | |
| yum: | |
| name: epel-release |
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
| .gitignore | |
| application/.htaccess | |
| application/cache/.htaccess | |
| application/cache/index.html | |
| application/config/autoload.php | |
| application/config/config.php | |
| application/config/constants.php | |
| application/config/database.php | |
| application/config/doctypes.php |
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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Website details | |
| | | |
| | These details are used in emails sent by authentication library. | |
| |-------------------------------------------------------------------------- | |
| */ | |
| $config['website_name'] = 'Instapitch'; |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Base Site URL | |
| |-------------------------------------------------------------------------- | |
| | | |
| | URL to your CodeIgniter root. Typically this will be your base URL, | |
| | WITH a trailing slash: | |
| | |
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
| <html> | |
| <head> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
| <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> | |
| <script type="text/javascript" src="https://raw.github.com/HPNeo/gmaps/master/gmaps.js"></script> | |
| </head> | |
| <body> | |
| <div id="map2"></div> | |
| </body> |
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
| [root@vpsgrid david]# npm ls | |
| npm WARN package.json david@0.0.1 No README.md file found! | |
| david@0.0.1 /root/david | |
| ├─┬ express@3.0.1 | |
| │ ├── commander@0.6.1 | |
| │ ├─┬ connect@2.6.2 | |
| │ │ ├── bytes@0.1.0 | |
| │ │ ├── formidable@1.0.11 | |
| │ │ ├── pause@0.0.1 | |
| │ │ └── qs@0.5.1 |
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
| [root@localhost app]# php index.php | |
| | PHP Int to String and Back |0.012935062068966 | | |
| | Ruby Int to String and Back |0.055767344827586 | | |
| | Python Int to String and Back |0.090967367435324 | | |
| | Node.js Int to String and Back |0.01944035497205 | | |
| | PHP Int to String and Concat |0.014449668965517 | | |
| | Ruby Int to String and Concat |0.061579172413793 | | |
| | Python Int to String and Concat |0.047807578382814 | | |
| | PHP Sequential Array Average |0.001556175862069 | | |
| | Ruby Sequential Array Average |0.021841517241379 | |
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
| $ch = curl_init("https://graph.facebook.com/1253601124/picture?type=large"); | |
| curl_setopt($ch, CURLOPT_HEADER, true); | |
| curl_setopt($ch, CURLOPT_NOBODY, true); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| $response = curl_exec($ch); | |
| curl_close($ch); | |
| $header = "Location: "; | |
| $pos = strpos($response, $header); |
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
| from collections import Counter | |
| def median(aray): | |
| srtd = sorted(aray) | |
| alen = len(srtd) | |
| return 0.5*( srtd[(alen-1)//2] + srtd[alen//2]) | |
| numbers = (1,2,3,4,5,6,7,8,9,10,10,10,11,12) | |
| from array import * | |
| mean = 0 | |
| for i in numbers: |
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
| $(document).ready(function(){ | |
| $("#add").click(function(){ | |
| $('#table').append("<tr><td>hello</td><td>world</td><td><input type='button' id='del' value='del' /></td></tr>"); | |
| }); | |
| $('#table').delegate('tr', 'click', function(event) { | |
| $(this).remove(); | |
| }); | |
| }); | |
| |