Skip to content

Instantly share code, notes, and snippets.

View dnunez24's full-sized avatar

Dave Nunez dnunez24

View GitHub Profile
@dnunez24
dnunez24 / craft-nexcess.txt
Created July 6, 2017 03:01
CraftCMS Nexcess Issues Example
leevigraham [5:28 PM]
Anyone had issues with mod_security and craft?
[5:29]
occasional 500 error when submitting content in admin
mildlygeeky
[5:52 PM]
@leevigraham lots of Matrix or Neo fields? (edited)
@dnunez24
dnunez24 / freight.json
Created February 21, 2017 18:22
CDW Freight API Proposed Transit Time Estimates
{
"ErrorMessage": "",
"Freight": {
"Details": [
{
"OrderLineNumber": 3,
"ProductCode": "2323892",
"ShippingMethods": [
{
"BoxHandlingCharge": 0,
@dnunez24
dnunez24 / prepend-header-row.sh
Created September 13, 2016 22:07
Prepend Header Row to Another File in Bash
head -n1 file-with-header.txt | cat - file-without-header.txt > tmp.txt && mv tmp.txt file-without-header.txt
@dnunez24
dnunez24 / varnishlog-purge.sh
Created September 13, 2016 15:57
Varnish View Logged Purge Requests
varnishlog -g request -q 'ReqMethod eq "PURGE"'
@dnunez24
dnunez24 / fibonacci.erl
Created May 6, 2014 16:02
Erlang Fibonacci
-module(fibonacci).
-export([seq/1, sum/1]).
seq(0) -> [0];
seq(1) -> [0, 1];
seq(N) when N > 1 ->
lists:reverse(seq(N, [1, 0])).
seq(1, Acc) -> Acc;
seq(N, Acc = [H1, H2 | _T]) ->