Skip to content

Instantly share code, notes, and snippets.

@moehammoud
moehammoud / email.html
Last active February 7, 2018 23:56
A Useful Guide for email HTML and quirk/bug fixes - No JS plugins/libraries
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
@moehammoud
moehammoud / gulpfile.js
Last active May 10, 2017 22:58
htmlbuild
{
"name": "play1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
@moehammoud
moehammoud / pass-button-click-as-prop-to-parent-function.js
Last active June 21, 2016 20:47
React JS. Pass button click as prop to parent function.
var ChildComponent = React.createClass({
render: function() {
return (
<div>
<button onClick={this.performMagicClick}>Do Magic</button>
</div>
);
}
});
@moehammoud
moehammoud / Access-JSON-State-Array
Last active February 15, 2020 18:52
React JS Cheatsheet.
JSON.stringify(this.state.data)
@moehammoud
moehammoud / 0_reuse_code.js
Created June 21, 2016 12:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console