This file contains 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
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"ecmaFeatures": { |
This file contains 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 loading = "\\|/—", | |
tick = 0, | |
loadingElement = document.createElement('div'); | |
loadingElement.id = 'loading'; | |
loadingElement.style.fontFamily = 'Consolas, "Liberation Mono", Courier, monospace'; | |
document.body.innerHTML = ''; | |
document.body.appendChild(loadingElement); | |
(function animate() { | |
tick = (tick + 1) % loading.length; |
This file contains 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
Show hidden characters
{ | |
// ----------------- | |
// -------------------------------------------------------------------- | |
// JSHint Configuration, Strict Edition | |
// -------------------------------------------------------------------- | |
// | |
// This is a options template for [JSHint][1], using [JSHint example][2] | |
// and [Ory Band's example][3] as basis and setting config values to | |
// be most strict: | |
// |
This file contains 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
"use strict"; | |
var passport = require('./passport'); | |
var config = { | |
redirectBack: redirectBack | |
} | |
function redirectBack(req, res) { | |
res.redirect(req.param('__back') && decodeURIComponent(req.param('__back')) || '/'); | |
} |
This file contains 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
ar TwitterStrategy = require('passport-twitter').Strategy; | |
var FacebookStrategy = require('passport-facebook').Strategy; | |
var LinkedinStrategy = require('passport-linkedin').Strategy; | |
var passport = require('passport'); | |
var _ = require('underscore'); | |
var configurable = require('configurable-module'); | |
function configure(options) { |
This file contains 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 https = require('https'); | |
const vm = require('vm'); | |
const requireCache = {}; | |
const requireUrl = url => new Promise((resolve, reject) => url in requireCache ? | |
resolve(requireCache[url]) : | |
https.get(url, res => { | |
const result = []; | |
res.on('data', chunk => result.push(chunk.toString('utf-8'))); |
This file contains 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
[push] | |
default = current | |
[user] | |
email = nik@butenko.me | |
name = Nik Butenko | |
[core] | |
autocrlf = input | |
excludesfile = /Users/nkbt/.gitignore | |
ignorecase = true | |
[alias] |
This file contains 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
{ | |
// ----------------- | |
// -------------------------------------------------------------------- | |
// JSHint Configuration, Strict Edition | |
// -------------------------------------------------------------------- | |
// | |
// This is a options template for [JSHint][1], using [JSHint example][2] | |
// and [Ory Band's example][3] as basis and setting config values to | |
// be most strict: | |
// |
This file contains 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
#!/usr/bin/env bash | |
set -eEo pipefail | |
shopt -s inherit_errexit >/dev/null 2>&1 || true | |
if [[ ! "$#" -eq 2 || "$1" != --bucket ]]; then | |
echo -e "USAGE: $(basename "$0") --bucket <bucket>" | |
exit 2 | |
fi |
This file contains 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
content = await(await fetch('https://www.instagram.com/nkbtnk/')).text() | |
doc = new DOMParser().parseFromString(content, 'text/html') | |
dataEl = Array.from(doc.querySelectorAll('script:not([src])')).find(s => s.innerText.includes('window._sharedData = ')) | |
match = dataEl.innerText.match(/\{.+}/) | |
data = JSON.parse(match[0]) | |
last12posts = data.entry_data.ProfilePage[0].graphql.user.edge_owner_to_timeline_media.edges |
NewerOlder