This file contains hidden or 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
add hmac signed url to header. requires a variable to be set on collection. replace key with whatever. | |
``` | |
pm.request.headers.add({ | |
key: 'sign', | |
value: CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA512(request['url'], pm.collectionVariables.get("SECRET"))) | |
}); | |
``` |
This file contains hidden or 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
`sudo mount /dev/mapper/data-root /mnt` | |
from https://support.system76.com/articles/pop-recovery/ |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am samthomson on github. | |
* I am samt (https://keybase.io/samt) on keybase. | |
* I have a public key ASBlJWdtvAUFjO3u0HEra363rFRTZH5cvK70C6AiBgvpMgo | |
To claim this, I am signing this object: |
This file contains hidden or 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
phpunit --filter {FUNCTION_NAME} {test_folder}/{test_file_no_extension} |
This file contains hidden or 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 start = new Date(); | |
var ffmpeg = require('fluent-ffmpeg'); | |
var path = require('path'); | |
const outputFolder = './out'; | |
let outputName = 'gopro'; | |
let outputPath = path.join(outputFolder, outputName); | |
let inputPath = './seed-videos/MAH04656.MP4' |
This file contains hidden or 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
# git rebase i expects a commit hash as an argument, but will rebase from after that commit. This will effectively rebase from before the commit. | |
git rebase -i `git merge-base feature master` |
This file contains hidden or 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
App::before(function($request) | |
{ | |
// if any characters in the route path are uppercase | |
if(ctype_upper(preg_replace('/[^\da-z]/i', '', $request->path()))){ | |
// extract the path section of the url (the route) from the url and convert it to lowercase | |
$sNewRelativePath = str_replace($request->path(), strtolower($request->path()), $request->fullUrl()); | |
// now redirect the user with a 301 to the lower case route | |
return \Illuminate\Support\Facades\Redirect::to($sNewRelativePath, 301); | |
} | |
}); |
This file contains hidden or 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
App::after(function($request, $response) | |
{ | |
// HTML Minification | |
if(!Config::get('app.debug')) | |
{ | |
if($response instanceof Illuminate\Http\Response) | |
{ | |
$output = $response->getOriginalContent(); | |
// Clean comments | |
$output = preg_replace('/<!--([^\[|(<!)].*)/', '', $output); |
NewerOlder