Skip to content

Instantly share code, notes, and snippets.

View zakness's full-sized avatar

Zak Linder zakness

  • Bloomberg
  • New York, NY
View GitHub Profile

URL

https://www.modsy.com/express/room-details/618345

404 curl:

curl 'https://www.warehouse.modsy.com/showroom/api/showrooms/618345' -H 'Accept: application/json, text/plain, */*' -H 'Referer: https://www.modsy.com/express/room-details/618345' -H 'Origin: https://www.modsy.com' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36' -H 'Authorization: JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Inpha25lc3NAZ21haWwuY29tIiwiZXhwIjoxNTU4ODI1ODcwLCJlbWFpbCI6Inpha25lc3NAZ21haWwuY29tIiwiZ3JvdXBzIjoiW10ifQ.ulgTmQol2k2K88y4-VTwZaRV_4HJpY-HFFYqoZ-dO-4' --compressed
@zakness
zakness / rrv4-history.md
Last active January 26, 2018 15:38
Programmatic routing with React Router v4

Export the history object you pass to your Router:

import { Router as ReactRouter } from 'react-router-dom'
import { createBrowserHistory } from 'history'

export const history = createBrowserHistory()

const Router = () =>
 
@zakness
zakness / tokywoky.md
Last active September 11, 2017 20:51
birchbox.co.uk + TokyWoky

Triggered on every page view:

Since the DOM does not refresh between page views, we need to delete everything Toky does not expect to be there.

var tokyContainer;
var tokyScript;
while (tokyContainer = document.getElementById('toky')) {
  tokyContainer.remove();
}
@zakness
zakness / stringToLocation.js
Created August 23, 2016 01:30
Parse a URL string using document.createElement('a')
// see http://stackoverflow.com/questions/736513
export const stringToLocation = (str = '') => {
const anchor = document.createElement('a')
anchor.href = str
// fix for relative URLS in IE
if (!anchor.host) {
anchor.href = anchor.href
}

Keybase proof

I hereby claim:

  • I am zakness on github.
  • I am zakness (https://keybase.io/zakness) on keybase.
  • I have a public key ASDhyOq8HTyhyLs9moRo2AQ8FkwrK48FvWo_WE3dSA1MHgo

To claim this, I am signing this object:

@zakness
zakness / gist:13bf99273fc2da19da4d
Last active August 29, 2015 14:09
Code style guide: Curly quotes and apostrophes

Use the typographically-correct quotation characters — ‘ ’ “ ” — inside strings rather than the easy-to-type straight quotes. Not only will it look better, it wont require escaping or remembering to alternate when nesting.

OS X has default key bindings for these characters, but they don’t make sense. Save the following snippet as ~/Library/KeyBindings/DefaultKeyBinding.dict to create custom key bindings on the [ ] { } keys for these characters.

{
    "~[" = ("insertText:", "‘");
    "~]" = ("insertText:", "’");
    "~{" = ("insertText:", "“");
 "~}" = ("insertText:", "”");
@zakness
zakness / StretchyTextArea.java
Last active September 25, 2015 00:37
A GWT TextArea that automatically stretches to fit its contents
/*
The MIT License (MIT)
Copyright (c) <year> <copyright holders>
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