Skip to content

Instantly share code, notes, and snippets.

@zacharytamas
zacharytamas / solution1.js
Last active September 6, 2018 19:27
There are so many ways to convert Roman numerals
const convertValueToSymbol = (() => {
const SYMBOLS = {
1000: 'M',
500: 'D',
100: 'C',
50: 'L',
10: 'X',
5: 'V',
1: 'I'
};
{
"Profiles": [
{
"Working Directory": "/Users/zachary",
"Prompt Before Closing 2": false,
"Selected Text Color": {
"Red Component": 0,
"Color Space": "Calibrated",
"Blue Component": 0,
"Alpha Component": 1,
@zacharytamas
zacharytamas / cloudSettings
Last active April 30, 2018 19:52
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-04-30T19:52:03.883Z","extensionVersion":"v2.9.0"}
@zacharytamas
zacharytamas / my-app.html
Created February 2, 2018 19:00
An example for Vincent.
<dom-module id="my-app">
<template>
<page-title base-title="My App" page-title="[[pageTitle]]"></page-title>
<iron-pages id="pages" attr-for-selected="name"
selected="{{selectedPage}}"
on-selected-item-changed="_selectedPageElementChanged"
on-update-page-title="_updatePageTitle">
### Keybase proof
I hereby claim:
* I am zacharytamas on github.
* I am zacharytamas (https://keybase.io/zacharytamas) on keybase.
* I have a public key ASAMaqyzP8ZxCgFIIA3lqxgDZGltHe6mHJQi6mnoUNQ4NQo
To claim this, I am signing this object:
@zacharytamas
zacharytamas / reddit-feed-row.js
Created December 6, 2016 17:34
RedditFeedRow
const RedditFeedRowTemplate = `
<style>
:host {
display: block;
}
div {
display: flex;
}
div > * {
var a = {
// This should be myFunc: function(a, b)
myFunc(a, b) {
console.log(a, b);
}
};
<link rel="import" href="../bower_components/polymer/polymer.html">
<polymer-element name="img-placeholder"
attributes="width height src alt">
<template>
<img src="http://placehold.it/{{ generatedSrc }}"
width="{{ width }}"
height="{{ height }}"
alt="{{ alt }}">
@zacharytamas
zacharytamas / gist:082e538784ebe07e40f9
Created June 13, 2014 19:24
Override window.location
(function () {
var _window = window;
(function () {
var window = {};
Object.defineProperty(window, 'location', {
get: function () { return _window.location; },
var a = new String('aaa');
var b = new String('aaa');
console.log(a == b); // false
var a = 'aaa';
var b = 'aaa';
console.log(a == b); // true