Skip to content

Instantly share code, notes, and snippets.

View carlosazaustre's full-sized avatar
🎃
HacktoberFest Time!

Carlos Azaustre carlosazaustre

🎃
HacktoberFest Time!
View GitHub Profile
<!doctype html>
<html ng-app="myApp">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<script type="text/javascript">
var myApp = angular.module('myApp', [], function ($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
});
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var assert = require('assert')
console.log('\n===========');
console.log(' mongoose version: %s', mongoose.version);
console.log('========\n\n');
var dbname = 'testing_geojsonPoint';
@carlosazaustre
carlosazaustre / Vagrantfile
Created February 17, 2014 07:27
Vagrantfile for Node.js development enviroment
Vagrant::Config.run do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.forward_port 3000, 3000
config.vm.share_folder "app", "/home/vagrant/app", "app"
# Uncomment the following line to allow for symlinks
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) {
$scope.$on('authLoaded', function() {
$scope.isExpert($scope.main.serieId);
$scope.isMember($scope.main.serieId);
});
$scope.loadAuth = function() {
Auth.load().success(function(data) {
$scope.main.user = data.user;
$scope.$broadcast("authLoaded");
# The first node application
upstream app-one {
server 127.0.0.1:3000 max_fails=0;
}
# The second node application
upstream app-two {
server 127.0.0.1:3001 max_fails=0;
}
@carlosazaustre
carlosazaustre / gulpfile.js
Last active August 29, 2015 14:23
Development server with Gulp
var gulp = require('gulp');
var webserver = require('gulp-webserver');
var historyApi = require("connect-history-api-fallback");
gulp.task('server', function(){
gulp.src( path.root )
.pipe(webserver({
host : "0.0.0.0",
port : 8080,
livereload : true,
@carlosazaustre
carlosazaustre / app.js
Created February 9, 2017 23:26
Guía React
class Empleado extends React.Component {
render () {
return (
<li>
{this.props.nombre} - {this.props.email}
</li>
);
}
}
@carlosazaustre
carlosazaustre / main.js
Created June 12, 2019 10:09
Async API calls inside While Loop (node.js)
const requestPromise = require('request-promise-native');
const API = 'https://jsonplaceholder.typicode.com/posts/';
function makeAPICall(id) {
return requestPromise({
url: API + id,
method: 'GET',
json: true
});
@carlosazaustre
carlosazaustre / extensions.json
Last active October 17, 2020 10:58
VS Code Extensions
{
"recommendations": [
"2gua.rainbow-brackets",
"alexcvzz.vscode-sqlite",
"bashmish.es6-string-css",
"bierner.jsdoc-markdown-highlighting",
"bierner.markdown-preview-github-styles",
"blanu.vscode-styled-jsx",
"bradlc.vscode-tailwindcss",
"bungcip.better-toml",
@carlosazaustre
carlosazaustre / settings.json
Created October 17, 2020 11:01
VS Code Settings
{
"workbench.colorTheme": "Sorcerer",
"workbench.iconTheme": "material-icon-theme",
"editor.tabSize": 2,
"editor.cursorStyle": "block",
"window.zoomLevel": 0,
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {