Skip to content

Instantly share code, notes, and snippets.

View bermanboris's full-sized avatar
🎯
Hyper Focusing

Boris Berman bermanboris

🎯
Hyper Focusing
  • Earth
View GitHub Profile
@bermanboris
bermanboris / Api.js
Created January 8, 2017 10:14
Api Static Class
export default class Api {
static headers() {
return {
'Accept': 'application/json',
'Content-Type': 'application/json',
'dataType': 'json',
}
}
static get(route) {
@bermanboris
bermanboris / phantomjs-example.ts
Last active July 2, 2020 03:50
PhantomJS usage in TypeScript ( Node.js )
// Usage:
//
// npm install phantom @types/phantom --save
// tsc --target "es6" ./phantomjs-example.ts
// node phantomjs-example.js
//
import * as phantom from "phantom";
async function getPageContent(url: string) {