Skip to content

Instantly share code, notes, and snippets.

View msbrime's full-sized avatar
Will code for coffee

Salis Braimah msbrime

Will code for coffee
View GitHub Profile
const jwt = require('jsonwebtoken');
const SECRET_KEY = process.env.JWT_SECRET;
const PERMISSION = {
principalId: 'user',
policyDocument: {
Version: '2012-10-17',
Statement: [
drakakisgeo / gist:3bba2a2600b4c554f836
Created May 7, 2015 13:51
Auto trim all input [Laravel 5]
// Step 1. Create this class in the middleware folder.
<?php namespace App\Http\Middleware;
use Closure;
class BeforeAutoTrimmer {
* Handle an incoming request.
fomightez / remove blank lines
Last active February 22, 2024 09:49
remove all blank lines using regular expressions
thomasfr / Git push deployment in 7 easy
Last active May 1, 2024 23:17
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
shamansir / jasmine.teamcity_reporter.js
Created August 28, 2012 11:56
All you need to run Jasmine Tests with Phantom at TeamCity
/* source: */
/* 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
jrivero /
Created July 15, 2011 20:33 — forked from palewire/
A Python CSV splitter
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.