Skip to content

Instantly share code, notes, and snippets.

View wintorez's full-sized avatar

Reza Sadr wintorez

View GitHub Profile
import React from 'react';
import memoize from 'lodash/memoize';
const Heading = memoize((props) => (
<div className="heading">
<div className="App-header">
<h2>{props.title}</h2>
</div>
</div>
), (props) => {
@wintorez
wintorez / inject.js
Created October 6, 2017 14:59
Use these functions to inject JavaScript and StyleSheets using Console
var injectStyle = function(pathToStyle) {
var head = document.getElementsByTagName("head")[0];
var link = document.createElement("link");
link.type = "text/css";
link.rel = "stylesheet";
link.href = pathToStyle;
head.appendChild(link);
};
var injectScript = function(pathToScript) {
@wintorez
wintorez / gmail_bookmarklet.txt
Last active October 18, 2017 23:55
Gmail bookmarklet
javascript:(function()%7Bm='http://mail.google.com/mail/?view=cm&fs=1&tf=1&to=&su='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(document.location);w=window.open(m,'addwindow','status=no,toolbar=no,width=575,height=545,resizable=yes');setTimeout(function()%7Bw.focus();%7D, 250);%7D)();