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 from 'react'; | |
import ReactDom from 'react-dom'; | |
import axios from 'axios'; | |
class Header extends React.Component { | |
constructor() { | |
super() | |
debugger | |
this.state = { | |
name: '', |
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 range = require('lodash.range'); | |
const flatten = require('flatten'); | |
const Promise = require('bluebird'); | |
const fs = require('fs'); | |
const RANGE = 60; | |
const RESOLUTIONS = ['1440x900','1600x900']; | |
const STATUS_OK = 200; | |
const ENCODING_FILE = 'binary'; |
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
// UPD: | |
// Now available as npm module! | |
// Check out https://github.com/RReverser/better-log for details. | |
console.log = (function (log, inspect) { | |
return function () { | |
return log.apply(this, Array.prototype.map.call(arguments, function (arg) { | |
return inspect(arg, { depth: 1, colors: true }); | |
})); | |
}; |
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
class BusEvents { | |
on(event, fn){} | |
emit(event, ...data){} | |
} | |
class JQueryBusEvents extends BusEvents{ | |
constructor($=window.jQuery){ | |
super(); | |
this.$doc = $(document); | |
} |
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
// Number -> Number -> Number | |
export const add = (a, b) => a + b | |
export const sum = (...numbers) => numbers.reduce(add, 0) | |
// Number -> Number | |
export const square = (x) => x * x | |
// Number -> Void | |
export const asyncSquare = (coll) => () => coll.map(square) |
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
set nocompatible " use vim features | |
" set foldmethod=syntax | |
set foldmethod=marker | |
set foldlevelstart=1 | |
set foldnestmax=5 | |
set foldclose=all | |
set nobackup " no backup | |
set nowritebackup " no backup during edit session | |
set backspace=indent,eol,start " backspace over everything | |
set tabstop=2 " size of a tab |
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
#!bash | |
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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 carlos = new Person(); |
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 http = require('http'), | |
ipReg = /\api\/v1\/ip\/(\w+)/, | |
iplookup = require( './lib/iplookup' ); | |
http.createServer(function (req, res) { | |
var ip = req.url.match( ipReg ); | |
if( !ip ) | |
{ | |
res.writeHead(404, {'Content-Type': 'text/html'}); |