Skip to content

Instantly share code, notes, and snippets.

View imperative.js
let a = 1;
let b = 2;
let c = a + b;
console.log('c = ', c);
//Output: c = 3
a = 2;
console.log('c = ', c);
//Output: c = 3
View ce_manifest_fixed.json
{
"name": "Chrome Extension React",
"version": "1.0",
"manifest_version": 2,
"browser_action": {
"default_popup": "index.html"
},
"content_security_policy": "script-src 'self' 'sha256-[YOUR_KEY_HERE]'; object-src 'self'"
}
View ce_manifest.json
{
"name": "Chrome Extension React",
"version": "1.0",
"manifest_version": 2,
"browser_action": {
"default_popup": "index.html"
}
}
View pwa_manifest.json
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
View wildfire.component.ts
import { Component } from '@angular/core';
declare const google: any;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
title: string = 'medium articles';
View wildfire.html
<agm-map [latitude]="lat" [longitude]="lng" [zoom]="zoom" (mapReady)="setMapInstance($event)">
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
</agm-map>
View block_example.json
{
"hash": "000000000000000000b57d57fc57e022fbebc6fbdee108095dcf1bfcdd68b4d5",
"ver": 536870912,
"prev_block": "0000000000000000034f2855c116b426305d82a54b29cceb32641da639aeef82",
"mrkl_root": "160ebb4ccf13cd61cdde124e661d6f93f693025ff8cc76baf6cb3de51c76b994",
"time": 1482003305,
"bits": 402885509,
"nonce": 1583068092,
"n_tx": 366,
"size": 125237,
View web_accessible_resource.js
{
//...
"web_accessible_resources": [
"images/*.png",
"style/double-rainbow.css",
"script/double-rainbow.js",
"script/main.js",
"templates/*"
],
//...
View CSP.js
{
//some props
"content_security_policy": "script-src: 'self'; object-src: 'self'; "
//some props
}
View Manifest.json
{
"manifest_version": 2,
"name": "Simple extension",
"description": "Simple description",
"version": 1.0,
"permissions": [],
"content_scripts": [],
"background": {},
"web_accessible_resources": [],
"browser_action": {},