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
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
fomightez / remove blank lines regex.md
Last active September 17, 2024 01:31
remove all blank lines using regular expressions
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active July 3, 2024 02:22
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@shamansir
shamansir / jasmine.teamcity_reporter.js
Created August 28, 2012 11:56
All you need to run Jasmine Tests with Phantom at TeamCity
/* 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
@jrivero
jrivero / csv_splitter.py
Created July 15, 2011 20:33 — forked from palewire/csv_splitter.py
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.
Arguments: