REGEX remove blank lines:
FROM: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/remove_blank_lines.html
FIND:
^(?:[\t ]*(?:\r?\n|\r))+
const jwt = require('jsonwebtoken'); | |
const SECRET_KEY = process.env.JWT_SECRET; | |
const PERMISSION = { | |
principalId: 'user', | |
policyDocument: { | |
Version: '2012-10-17', | |
Statement: [ | |
{ |
// Step 1. Create this class in the middleware folder. | |
<?php namespace App\Http\Middleware; | |
use Closure; | |
class BeforeAutoTrimmer { | |
/** | |
* Handle an incoming request. |
REGEX remove blank lines:
FROM: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/remove_blank_lines.html
FIND:
^(?:[\t ]*(?:\r?\n|\r))+
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
/* source: https://github.com/larrymyers/jasmine-reporters */ | |
/* The MIT License | |
Copyright (c) 2010 Larry Myers | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
import os | |
def split(filehandler, delimiter=',', row_limit=10000, | |
output_name_template='output_%s.csv', output_path='.', keep_headers=True): | |
""" | |
Splits a CSV file into multiple pieces. | |
A quick bastardization of the Python CSV library. | |
Arguments: |