Skip to content

Instantly share code, notes, and snippets.

👋
Coding

Zander Martineau mrmartineau

👋
Coding
Block or report user

Report or block mrmartineau

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mrmartineau
mrmartineau / stimulus.md
Last active Oct 17, 2019
Stimulus cheatsheet
View stimulus.md
View gist:89b264dda8902f7f2ced90b114fc6704
Verifying my Blockstack ID is secured with the address 1yEg3gcmHZtHZp2eoFy8UocU3H8dxuKPh https://explorer.blockstack.org/address/1yEg3gcmHZtHZp2eoFy8UocU3H8dxuKPh
@mrmartineau
mrmartineau / gitcom.md
Created Nov 18, 2017 — forked from jedmao/gitcom.md
Common git commands in a day-to-day workflow
View gitcom.md

Git Cheat Sheet

Initial Setup

Initialize a repo

Create an empty git repo or reinitialize an existing one

$ git init
@mrmartineau
mrmartineau / offsec.md
Created Nov 18, 2017 — forked from jivoi/offsec.md
Penetrating Testing/Assessment Workflow
View offsec.md

Penetrating Testing/Assessment Workflow & other fun infosec stuff

https://github.com/jivoi/pentest

My feeble attempt to organize (in a somewhat logical fashion) the vast amount of information, tools, resources, tip and tricks surrounding penetration testing, vulnerability assessment, and information security as a whole*

@mrmartineau
mrmartineau / .htaccess
Created Nov 18, 2017 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@mrmartineau
mrmartineau / bling.js
Created Nov 18, 2017 — forked from paulirish/bling.js
bling dot js
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@mrmartineau
mrmartineau / certificate.sh
Created Nov 18, 2017 — forked from WebReflection/certificate.sh
A basic Self Signed SSL Certificate utility
View certificate.sh
#!/usr/bin/env bash
# A basic Self Signed SSL Certificate utility
# by Andrea Giammarchi @WebReflection
# https://www.webreflection.co.uk/blog/2015/08/08/bringing-ssl-to-your-private-network
# # to make it executable and use it
# $ chmod +x certificate
# $ ./certificate # to read the how-to
@mrmartineau
mrmartineau / array_iteration_thoughts.md
Last active Jul 26, 2019 — forked from ggauravr/array_iteration_thoughts.md
Array iteration methods summarized
View array_iteration_thoughts.md

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.

Intro

JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and

@mrmartineau
mrmartineau / git.sh
Created Nov 18, 2017
Various git commands
View git.sh
git push origin --delete branch1 branch2
@mrmartineau
mrmartineau / themes.html
Created Jan 20, 2017
From my blog post: Creating dynamic layouts with Jekyll
View themes.html
<style>
.hero {
background-color: {{ page.style.color.primary }};
color:{{ page.hero.color }};
background-image: url({{ site.assets.imgPath }}{{ page.hero.bg }}?w=500&{{ site.assets.params }});
}
.hero-title {
color: {{ page.hero.color }};
}
.hero-link {
You can’t perform that action at this time.