Skip to content

Instantly share code, notes, and snippets.

Recently, GitHub introduced the change in how atx headers are parsed in Markdown files.

##Wrong

Correct

While this change follows the spec, it breaks many existing repositories. I took the README dataset which we created at source{d} and ran a simple

import java.util.concurrent._
import scala.util.DynamicVariable
package object common {
val forkJoinPool = new ForkJoinPool
abstract class TaskScheduler {
def schedule[T](body: => T): ForkJoinTask[T]
@JulienBlancher
JulienBlancher / filter.d_nginx-auth.conf
Last active March 26, 2024 12:52
Fail2ban Config with Nginx and SSH
#
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf:
#
# Blocks IPs that makes too much accesses to the server
#
[Definition]
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*"
ignoreregex =
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@skovalyov
skovalyov / pet-project.conf
Created July 12, 2012 21:31
Nginx configuration to deploy Node application in subfolder
upstream pet_project {
server localhost:3000;
}
server {
listen 80;
server_name frontend;
location /demo/pet-project {
alias /opt/demo/pet-project/public/;
@timoxley
timoxley / gist:1721593
Created February 2, 2012 04:58
Recursively run all tests in test directory using mocha
// this will find all files ending with _test.js and run them with Mocha. Put this in your package.json
"scripts": {
"test": "find ./tests -name '*_test.js' | xargs mocha -R spec"
},
@hagino3000
hagino3000 / app.js
Created March 14, 2011 21:15
JSON-RPC for node (express)
/**
* Module dependencies.
*/
var express = require('express');
var rpcMethods = require('./methods.js');
var app = module.exports = express.createServer();
// Configuration
var fs = require('fs')
var sys = require('sys')
function parseCsvFile(fileName, callback){
var stream = fs.createReadStream(fileName)
var iteration = 0, header = [], buffer = ""
var pattern = /(?:^|,)("(?:[^"]+)*"|[^,]*)/g
stream.addListener('data', function(data){
buffer+=data.toString()