So here's the problem, you're working in a file, let's say:
├── my-project
│ └── src
│ ├── cool-module
│ │ └── index.js
│ └── lib
│ ├── helpers.js
│ └── super-lib
export type ServiceDefinition = { | |
[x: string]: MethodDefinition; | |
}; | |
export type MethodDefinition = { | |
[x: string]: StringConstructor | NumberConstructor; | |
}; | |
export type ServiceObject<T extends ServiceDefinition> = { | |
[P in keyof T]: ServiceMethod<T[P]> |
import prettier from "prettier/standalone"; | |
import path from "path"; | |
const plugins = [ | |
require("prettier/parser-graphql"), | |
require("prettier/parser-babylon") | |
]; | |
const EXTENSION_TO_PARSER = { | |
ts: "typescript", |
import { Component } from '@angular/core'; | |
import { HttpClient } from '@angular/common/http'; | |
function getData(url) { | |
return function (target, key) { | |
const privateKey = `_${key}` | |
function getter() { | |
if (this[privateKey]) { | |
return this[privateKey]; |
#!/bin/bash | |
sudo apt-get update -y | |
sudo apt-get install ruby wget -y | |
cd /home/ubuntu | |
wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install | |
chmod +x ./install |
So here's the problem, you're working in a file, let's say:
├── my-project
│ └── src
│ ├── cool-module
│ │ └── index.js
│ └── lib
│ ├── helpers.js
│ └── super-lib
import Head from 'next/head' | |
import { Container } from 'reactstrap' | |
const Layout = (props) => ( | |
<div> | |
<Head> | |
<title>PairHub</title> | |
<meta name="viewport" content="initial-scale=1.0, width=device-width" /> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" /> | |
</Head> |
// Copy and paste this code to the Developer Console | |
$(".link span").each(function(index,elem) { | |
if($(this).text() < 10) { | |
$(this).parent().parent().parent().parent().parent().parent().hide() | |
} | |
}) |
function sum( a, b ) { | |
return a + b; | |
} |
{ | |
"name": "Československé Státní Aerolinie (ČSA) Flight OK540", | |
"occurrenceType": "Accident", | |
"image": "Ilyushin_Il-62,_CSA_-_Ceskoslovenske_Aerolinie_AN0197189.jpg", | |
"caption": "An CSA Il-62, similar to the accident aircraft", | |
"date": "1975-08-19T21:00:00.000Z", | |
"summary": "CFIT", | |
"site": "Damascus International Airport", | |
"aircraftType": "Ilyushin Il-62", | |
"aircraftName": "Brno Trade Fair", |
CREATE OR REPLACE FUNCTION notify_trigger() RETURNS trigger AS $$ | |
DECLARE | |
channel_name varchar DEFAULT (TG_TABLE_NAME || '_changes'); | |
BEGIN | |
IF TG_OP = 'INSERT' THEN | |
PERFORM pg_notify(channel_name, '{"id": "' || NEW.id || '"}'); | |
RETURN NEW; | |
END IF; | |
IF TG_OP = 'DELETE' THEN | |
PERFORM pg_notify(channel_name, '{"id": "' || OLD.id || '"}'); |