Skip to content

Instantly share code, notes, and snippets.

View maephisto's full-sized avatar

Marius Mischie maephisto

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://accounts.google.com/o/saml2?idpid=C04i8baxj" validUntil="2027-10-05T20:42:36.000Z">
<md:IDPSSODescriptor WantAuthnRequestsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<md:KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>MIIDdDCCAlygAwIBAgIGAYOvCSwJMA0GCSqGSIb3DQEBCwUAMHsxFDASBgNVBAoTC0dvb2dsZSBJ
bmMuMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MQ8wDQYDVQQDEwZHb29nbGUxGDAWBgNVBAsTD0dv
b2dsZSBGb3IgV29yazELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEwHhcNMjIxMDA2
MjA0MjM2WhcNMjcxMDA1MjA0MjM2WjB7MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEWMBQGA1UEBxMN
TW91bnRhaW4gVmlldzEPMA0GA1UEAxMGR29vZ2xlMRgwFgYDVQQLEw9Hb29nbGUgRm9yIFdvcmsx
<?xml version="1.0" encoding="UTF-8"?><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://accounts.google.com/o/saml2?idpid=C04i8baxj" validUntil="2027-10-05T20:42:36.000Z">
<md:IDPSSODescriptor WantAuthnRequestsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<md:KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>MIIDdDCCAlygAwIBAgIGAYOvCSwJMA0GCSqGSIb3DQEBCwUAMHsxFDASBgNVBAoTC0dvb2dsZSBJ
bmMuMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MQ8wDQYDVQQDEwZHb29nbGUxGDAWBgNVBAsTD0dv
b2dsZSBGb3IgV29yazELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWEwHhcNMjIxMDA2
MjA0MjM2WhcNMjcxMDA1MjA0MjM2WjB7MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEWMBQGA1UEBxMN
TW91bnRhaW4gVmlldzEPMA0GA1UEAxMGR29vZ2xlMRgwFgYDVQQLEw9Hb29nbGUgRm9yIFdvcmsx
@maephisto
maephisto / module-README.md
Last active June 26, 2018 07:10
Module README template

Package name

Short description about the intended purpose of the package.E.g. This package offers a way to create and manage dragons.

Usage

How does one use this package? Provide examples. E.g. Package can be installed from NPM registry via npm i dragon

Package API

Documents the public API fo the module. E.g.

@maephisto
maephisto / expressive-console.js
Created August 28, 2017 14:29
A expressive layer added on top of Javascript's `console` to better illustrate what that voice in your mind is saying.
var _log = console.log;
var _error = console.error;
var _warning = console.warn;
console.error = function (errMessage) {
errMessage = 'Ooooh 💩💩💩 : ' + errMessage;
_error.apply(console, arguments);
};
console.log = function (logMessage) {
@maephisto
maephisto / Bohemian Rhapsody in Javascript
Created May 20, 2015 10:14
Bohemian Rhapsody in Javascript
try {
assert(Life.isReal);
assert(Life.isFantasy);
} catch (LandSlideException ex) {
while(!Reality.isEscapable) {
self.eyes.forEach(function(eye) {
eye
.open()
.lookTo(Sky)
.see();
@maephisto
maephisto / git-prepush-hook
Last active August 29, 2015 14:19
git prepush hook
#!/bin/sh
echo "\nLet me check if you can push this!"
echo "\nExecuting unit tests..."
testValidationResult=$(grunt test | grep "Done, without errors")
if [ "$testValidationResult" != "" ]; then
echo "\033[32mUnit tests execution passed. Wow, such tests, much green!\033[0m"
else
@maephisto
maephisto / DustJS Access Array By Index
Created March 6, 2015 10:18
How to access elements by index in DustJs
{#names}{@idx}
{@if cond="('{.}' == 0)"}
First is: {name}
{:else}
Other: {name}
{/if}
{/idx}{/names}
@maephisto
maephisto / git-pre-commit-hook validator
Last active August 29, 2015 14:14
Pre-commit hook doing a jshint and less before comitting.
#!/bin/sh
echo "\nLet me check if you can commit!"
jsFiles=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$")
lessFiles=$(git diff --cached --name-only --diff-filter=ACM | grep ".less$")
if [ "$jsFiles" = "" ]; then
echo "\033[32mNo JavaScript files were modified.\033[0m"
if [ "$lessFiles" = "" ]; then
@maephisto
maephisto / solution.js
Created January 29, 2015 21:03
Trello Javascript challenge solution
// what we're working with
var characterList = 'acdegilmnoprstuw';
// what we're going for
var theHashWeWereLookingFor = 956446786872726;
var theMagicString = '';
//Now reverse engineer
while (theHashWeWereLookingFor > 7 ) {
var counter = 0;
@maephisto
maephisto / AWS base64 image upload
Created June 16, 2014 11:30
Node upload base64 image data to AWS
var config = {
"aws" : {
"bucket": "...",
"domain" : "...",
"prefix" : "..",
"path": "my/test/",
"credentials" : {
"accessKeyId": "...",
"secretAccessKey": "..."
}