Skip to content

Instantly share code, notes, and snippets.

View zeptobook's full-sized avatar

ZeptoBook zeptobook

View GitHub Profile
const person = {
firstname: 'fname',
lastname: 'lname'
}
console.log(person.firstname); // ok
console.log(person.address.city); // error: Uncaught TypeError: Cannot read property 'city' of undefined
.article-box{
margin: 1.5em 2em;
padding: 2em;
box-shadow: 0px 0px 6px darkseagreen;
font-family: 'Helvetica';
border: solid 2px darkgoldenrod;
}
.title{
font-size: 2em;
color: white;
export const query = graphql`
query {
allMarkdownRemark {
totalCount
edges {
node {
id
frontmatter {
title
date
{
allMarkdownRemark {
totalCount
edges {
node {
frontmatter {
title
date
author
}
title date author
Gatsby Third Blog Post
2019-09-03
Adesh

This is my third Gatsby blog post.

A brilliant header, clean sidebar, and minimalist footer can go a long way towards making a blog look good. But the one area that’s often overlooked in blog design is the post styling.

title date author
Gatsby Second Blog Post
2019-09-02
Adesh

This is my second Gatsby blog post.

Writing a blog post is a little like driving; you can study the highway code (or read articles telling you how to write a blog post) for months, but nothing can prepare you for the real thing like getting behind the wheel and hitting the open road. Or something.

title date author
Gatsby First Blog Post
2019-09-01
Adesh

This is my first Gatsby blog post.

You've probably heard how paramount blogging is to the success of your marketing. But it's important that you learn how to start a blog and write blog posts for it so that each article supports your business.

contract ERC20 {
function totalSupply() constant returns (uint theTotalSupply);
function balanceOf(address _owner) constant returns (uint balance);
function transfer(address _to, uint _value) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function approve(address _spender, uint _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint remaining);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
// clone request and replace 'http://' with 'https://' at the same time
const httpsReq = req.clone({
url: req.url.replace("http://", "https://")
});
return next.handle(httpsReq);
ngOnInit() {
this.http
.get("http://localhost:4200/cars")
.subscribe(data => console.log(data));
}