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
| $.getJSON( "//freegeoip.net/json/" + window.location.host + "?callback=?", function(data) { | |
| console.warn('Fetching JSON data...'); | |
| // Log output to console | |
| console.info(JSON.stringify(data, null, 2)); | |
| }); |
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
| <video loop autoplay> | |
| <source src="LAEPANIMACION/slidenuevo.mp4" type="video/mp4"> | |
| </video> |
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
| // Load the TCP Library | |
| net = require('net'); | |
| // Keep track of the chat clients | |
| var clients = []; | |
| // Start a TCP Server | |
| net.createServer(function (socket) { | |
| // Identify this client |
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 () { | |
| $.getJSON("https://jsonip.com/?callback=?", function (data) { | |
| console.log(data); | |
| alert(data.ip); | |
| }); | |
| }); |
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
| navigator | |
| .geolocation | |
| .getCurrentPosition(position=> { | |
| var lat = position.coords['latitude']; | |
| var lng = position.coords['longitude']; | |
| console.log(`your current location is ${lat}, ${lng}`); | |
| }) |
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
| navigator | |
| .geolocation | |
| .getCurrentPosition(position=> { | |
| var lat = position.coords['latitude']; | |
| var lng = position.coords['longitude']; | |
| console.log(lat, lng); | |
| }) |
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
| @function pow($number, $exponent) | |
| @if (round($exponent) != $exponent) | |
| @return exp($exponent * ln($number)) | |
| $value: 1 | |
| @if $exponent > 0 | |
| @for $i from 1 through $exponent | |
| $value: $value * $number |
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
| //JUST to show record within mongodb | |
| var collections = db.getCollectionNames(); | |
| print('Collections inside the db:'); | |
| for(var i = 0; i < collections.length; i++){ | |
| var name = collections[i]; | |
| if(name.substr(0, 6) != 'system') | |
| print(name + ' - ' + db[name].count() + ' records'); | |
| } |
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 collections = db.getCollectionNames(); | |
| for(var i = 0; i< collections.length; i++){ | |
| print('Collection: ' + collections[i]); // print the name of each collection | |
| db.getCollection(collections[i]).find().forEach(printjson); //and then print the json of each of its elements | |
| } |
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
| /** | |
| * Module Dependencies | |
| */ | |
| var gulp = require('gulp'); | |
| var browserSync = require('browser-sync'); | |
| var reload = browserSync.reload; | |
| var nodemon = require('gulp-nodemon'); | |
| var g_sass = require('gulp-sass'); | |
| var pug = require('gulp-pug'); |