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
| const defer = () => { | |
| const deferred = {} | |
| deferred.promise = new Promise((resolve, reject) => { | |
| deferred.resolve = resolve | |
| deferred.reject = reject | |
| }) | |
| return deferred | |
| } | |
| class Task { |
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
| fn main() { | |
| let mut arr = vec![ | |
| 8, | |
| 4, | |
| 1, | |
| 10, | |
| 0, | |
| 3, | |
| 4, | |
| 3, |
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
| let s:closed_tag_regexp = '<\/\(\w\|\.\)\+>' | |
| let s:tag_name_regexp = '<\(\w\|\.\|:\)\+' | |
| let s:tag_regexp = s:tag_name_regexp.'\(\s\+[^>]\+\s*\)*' | |
| function! ExpandSnippetOrCarriageReturn() | |
| let snippet = UltiSnips#ExpandSnippetOrJump() | |
| if g:ulti_expand_or_jump_res > 0 | |
| return snippet | |
| else | |
| let col = col('.') - 1 | |
| if col && strpart(getline('.'), col) =~ '^'.s:closed_tag_regexp |
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 React, { Component, PropTypes } from 'react'; | |
| import { findDOMNode } from 'react-dom'; | |
| import { Layout } from 'app/components/base/Layout'; | |
| import classnames from 'classnames'; | |
| import style from './style.css'; | |
| const nextFrame = window.requestAnimationFrame || (cb => setTimeout(cb, 0)); | |
| class Drawer extends Component { | |
| state = { |
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
| const fs = require('fs'); | |
| const HtmlPlugin = require('html-webpack-plugin'); | |
| const path = require('path') | |
| // webpack.config.js | |
| module.exports = { | |
| output: { | |
| path: './build', // This is where images AND js will go | |
| publicPath: '/', | |
| filename: '[name].html' |
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
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6+FotqdBGdky4u3pTAtFWPiQZlMb+hi3b7/ZlvMhugPHD0aLymu2JCZdznS9KaW6I6JtjG2YQ/s/Nhg88BlXwMBUb4iUvdpe3XvY5eHxkoHCTquwcLvX+3JLZg4+Mnqd4spa9ley3npScKEnUuIhPb+E7IxP9RfaCXJ+2VbdDktnXl8Y0PMeP5aPMXGR5kETaPIjdYGuCvMNliWLV+Oj4UmdRfmByD0zKEAraCMMcEt8mX3W5VFj+UC9yboLIp7/qvpr6A9KTpGehBrzXrfeL0nVpXEUv43gU071FKlikvZbE8WQE6lqMjtDZLsUerGORvXkGJnhcCczdozppUz01 etf@samantha |
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
| /** | |
| * WordCounter.js | |
| * a command-line tool by eloytoro | |
| * | |
| * How to use: | |
| * | |
| * $ node word-counter.js <dir> | |
| * - Count the word occurrences among all the files within the given directory directory. | |
| * - It will split the task between 3 workers, each of which could run completely standalone | |
| * by communicating to the main server using TCP sockets if it exposes its address publicly |
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'), | |
| browserSync = require('browser-sync'), | |
| sass = require('gulp-sass'), | |
| reload = browserSync.reload, | |
| bower = require('gulp-bower'), | |
| naturalsort = require('gulp-natural-sort'), | |
| filesort = require('gulp-angular-filesort'), | |
| inject = require('gulp-inject'), | |
| merge = require('merge-stream'), | |
| watch = require('gulp-watch'), |
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
| .service('Modal', function (ModalTemplate, $timeout, $q) { | |
| this.confirm = new ModalTemplate({ | |
| templateUrl: 'views/modals/confirm.html', | |
| }); | |
| var self = this; | |
| this.newPoll = new ModalTemplate({ | |
| templateUrl: 'views/modals/new-poll.html', | |
| containerUrl: 'views/directives/modal-template.html', |
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 router = require(/* definir un nombre unico */ 'koa-router'), | |
| mongoose = require('mongoose'), | |
| User = mongoose.model('User'), | |
| Report = mongoose.model('Report'), | |
| // home seria el router que parte desde el url '/' | |
| home = router(), | |
| users = home.route('/users'), | |
| reports = home.route( | |
| // no se si sea buena idea incluir el '/' al comienzo del regex | |
| /\/(reports|users\/:user\/reports)/ |