This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"series_id":"ELEC.PLANT.GEN.2-ALL-ALL.M", | |
"name":"Net generation : Bankhead Dam (2) : all fuels : all primemovers : monthly", | |
"units":"megawatthours", | |
"f":"M", | |
"description":"Summation of all fuels used for electricity generation; ", | |
"copyright":"None", | |
"source":"EIA, U.S. Energy Information Administration", | |
"iso3166":"USA-AL", | |
"lat":"33.458665", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; | |
export const store = createStore<StoreState, FilterAction, any, any>( | |
rootReducer, | |
{ | |
query: initialQueryState, | |
ui: { | |
hello: "world" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var input = document.querySelector('input'); | |
var btn = document.querySelector('button'); | |
var para = document.querySelector('p'); | |
btn.onclick = function() { | |
var code = input.value; | |
para.textContent = eval(code); | |
} | |
function Person(first, last, age, gender, interests) { | |
this.name = { | |
first, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Get, Controller } from '@nestjs/common'; | |
import elasticsearch = require('elasticsearch'); | |
@Controller('search') | |
export class SearchController { | |
@Get() | |
async doSearch(): Promise<any> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ npm-script cat package.json | |
{ | |
"name": "npm-script", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"echo": "source .env && echo $FOO" | |
}, | |
"author": "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<my-directive foo="bar"></my-directive> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const async = require('async'); | |
function myObject (text) { | |
this.text = text; | |
} | |
myObject.prototype.run = function (callback) { | |
async.parallel( | |
[ | |
this.doing, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example of using .call with an IIFE | |
function myObject (text) { | |
this.text = text; | |
} | |
myObject.prototype.print = function () { | |
console.log(this.text); // works |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.products = [ | |
'product1' = { | |
title = 'Product 1', | |
links = 'linksA', | |
} | |
'product2' = { | |
title = 'Product 2', | |
links = 'linksB', | |
} | |
'product3' = { |