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
| import { renderToString } from 'react-dom/server' | |
| import { match, RouterContext } from 'react-router' | |
| import routes from './routes' | |
| serve((req, res) => { | |
| // Note that req.url here should be the full URL path from | |
| // the original request, including the query string. | |
| match({ routes, location: req.url }, (error, redirectLocation, renderProps) => { | |
| if (error) { | |
| res.status(500).send(error.message) |
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 config = { | |
| dir: './models', | |
| adapters: { | |
| 'memory': require('sails-memory') | |
| }, | |
| connections: { | |
| default: { | |
| adapter: 'memory' |
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
| //esto agrega babel a cualquier código escrito en es6 en el servidor, | |
| //solo para entorno de desarrollo | |
| require("babel-register")({ | |
| presets: ['es2015', 'react'], | |
| plugins: [ | |
| 'transform-decorators-legacy', | |
| 'transform-class-properties' | |
| ] | |
| }); |
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 gulp = require('gulp'), | |
| stylus = require('stylus'), | |
| nib = require('nib'), | |
| through = require('through2'); | |
| function stylus_raw(){ | |
| function stream(){ | |
| function compile(file, enc, cb){ | |
| var compiled; | |
| var options = { |
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 gulp = require('gulp'), | |
| jade = require('jade'), | |
| through = require('through2'); | |
| function jade_raw () { | |
| function stream () { | |
| function compile (file, enc, cb) { | |
| var compiled; | |
| var options = { | |
| // Jade options goes here :) |
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
| { | |
| "name": "npm-modules", | |
| "version": "0.0.0", | |
| "description": "mi lista npm modules mas usados", | |
| "repository": { | |
| "type": "git", | |
| "url": "" | |
| }, | |
| "author": "zrobit", | |
| "license": "ISC", |
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
| [(site:"*gob.pe") + (filetype:pdf | filetype:pdfx | filetype:pptx | filetype:docx | filetype:xlsx)] |
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 gulp = require('gulp'), | |
| jade = require('jade'), | |
| through = require('through2'); | |
| var templates = function(){ | |
| var render = function(){ | |
| function compile(file, enc, cb){ | |
| var compiled; | |
| var contents = String(file.contents); | |
| //aqui va tu data pero podrías cargarlo desde un archivo con require |
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
| // IIFE - Immediately Invoked Function Expression | |
| (function($, window, document) { | |
| // The $ is now locally scoped | |
| // Listen for the jQuery ready event on the document | |
| $(function() { | |
| // The DOM is ready! |
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
| // PONG.cpp : main project file. | |
| #include "stdafx.h" | |
| #include <conio.h> | |
| #include <stdio.h> | |
| #include <math.h> | |
| #include <windows.h> | |
| using namespace System; |