Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am masimplo on github.
  • I am masimplo (https://keybase.io/masimplo) on keybase.
  • I have a public key ASCwfUaTcuNwy8L0Ed6-ZHo55btmYtoQJW2dme2ooNfe9wo

To claim this, I am signing this object:

@masimplo
masimplo / bump-version.gradle
Last active July 11, 2019 09:31
Bump android version in gradle
def getVersionName = { getVersionProps()['appVersionName'] }
def getVersionProps() {
def versionPropsFile = file('gradle.properties')
if (!versionPropsFile.exists()) {
versionPropsFile.createNewFile()
}
def versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
return versionProps
import React from 'react';
import Helmet from 'react-helmet';
import PropTypes from 'prop-types';
import { useStaticQuery, graphql } from 'gatsby';
import Facebook from './Facebook';
import Twitter from './Twitter';
// Complete tutorial: https://www.gatsbyjs.org/docs/add-seo-component/
const SEO = ({ title, description, banner, pathname, article, lang, robots, node }) => {
@masimplo
masimplo / meta-tags.md
Created February 16, 2019 11:46 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@masimplo
masimplo / destroyable.decorator.ts
Created October 3, 2018 08:10
Angular Destroyable component decorator
import { Observable } from 'rxjs/Observable';
export function Destroyable() {
return (target) => {
const originalOnDestroy: Function = target.prototype.ngOnDestroy;
// tslint:disable-next-line:only-arrow-functions
target.prototype.ngOnDestroy = function() {
if (!('_componentDestroyed$' in this || !(this._componentDestroyed$ instanceof Observable))) {
throw new Error('Destroyable components must define _componentDestroyed$ property');
@masimplo
masimplo / rxjs-diagrams.md
Created October 2, 2018 11:28 — forked from PCreations/rxjs-diagrams.md
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@masimplo
masimplo / lookup.json
Created May 14, 2018 06:59
Twitter /users/lookup response example
{
"created_at": "Mon Mar 05 19:27:40 +0000 2018",
"id": 970742659059986432,
"id_str": "970742659059986432",
"text": "Last week, we saw a safe return for three crew from @Space_Station​, a new weather satellite launched into orbit, a… https://t.co/m3XyUdAaJk",
"truncated": true,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [
@masimplo
masimplo / app.module.ts
Created September 11, 2017 12:04
Using environments in Ionic
import { EnvironmentsModule } from '../environment/environment.module';
@NgModule({
...
imports: [
...
EnvironmentsModule,
...
]
...
@masimplo
masimplo / code.ts
Created June 30, 2017 09:36
Testing presentables
const modal = this._modal.create(CommunicationAddNoteModalComponent);
modal.onDidDismiss((data: { note: string }) => {
this.note = data.note;
});
modal.present();