--- a.txt 2020-02-06 10:28:05.000000000 +0000
+++ b.txt 2020-02-06 10:28:22.000000000 +0000
@@ -1,5 +1,5 @@
module MyModule where
foo :: [Int] -> [Int]
-foo ints = map bar (map baz ints)
+foo ints = map (bar . baz) ints
This file contains 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
// Port, host and auth token of Redis server might be defined as environment | |
// variables. If not, fall back to defaults. | |
var redisPort = process.env.REDIS_PORT || 6379, | |
redisHost = process.env.REDIS_HOST || '127.0.0.1', | |
redisAuth = process.env.REDIS_AUTH || null, | |
redis = require('redis'); | |
// Since we are waiting for the error event, we don't have to check for errors | |
// individually after each Redis command. | |
var onError = function (error) { |
This file contains 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 bencode = require('bencode'), | |
dgram = require('dgram'), | |
hat = require('hat'), | |
_ = require('lodash'); | |
// Put in a function. The returned function won't ever throw an error. This is | |
// quite useful for malformed messages. | |
var makeSafe = function (fn, onFuckedUp) { | |
return function () { | |
try { |
This file contains 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
" Make backspace behave in a sane manner. | |
set backspace=indent,eol,start | |
" Switch syntax highlighting on. | |
syntax on | |
" Enable file type detection and do language-dependent indenting. | |
filetype plugin indent on | |
set runtimepath^=~/.config/nvim/bundle/ctrlp.vim |
This file contains 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
--- a.txt 2020-02-06 10:28:05.000000000 +0000 | |
+++ b.txt 2020-02-06 10:28:22.000000000 +0000 | |
@@ -1,5 +1,5 @@ | |
module MyModule where | |
foo :: [Int] -> [Int] | |
-foo ints = map bar (map baz ints) | |
+foo ints = map (bar . baz) ints | |
This file contains 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
// This file is part of github.com/Trrnts/Trrnts - an upcoming alternative to The Pirate Bay. | |
var bencode = require('bencode'), | |
dgram = require('dgram'), | |
hat = require('hat'), | |
_ = require('lodash'), | |
redis = require('../redis')(), | |
geoip = require('geoip-lite'); | |
// Put in a function. The returned function won't ever throw an error. This is |
This file contains 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 request = require('request'), | |
_ = require('lodash'); | |
// 100: Audio | |
// 200: Video | |
// 300: Applications | |
// 400: Games | |
// 500: Porn | |
// 600: Other | |
var categories = [100, 200, 300, 400, 500, 600]; |
This file contains 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 fs = require('fs'); | |
var words = fs.readFileSync('/usr/share/dict/words', { | |
encoding: 'utf8' | |
}).split('\n'); | |
var tlds = ['co', 'com', 'io', 'de', 'it']; | |
var results = []; |
This file contains 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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.chart { | |
height: 70px; | |
width: 300px; | |
border-bottom: 1px solid #ccc; | |
display: block; | |
margin: 1em; | |
} |
This file contains 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
diff --git a/lib/module.js b/lib/module.js | |
index fb233d6..a2f6faa 100644 | |
--- a/lib/module.js | |
+++ b/lib/module.js | |
@@ -103,20 +103,35 @@ function tryPackage(requestPath, exts, isMain) { | |
if (!pkg) return false; | |
var filename = path.resolve(requestPath, pkg); | |
+ var _filename = path.resolve(requestPath, '_' + pkg); | |
+ |
NewerOlder