View github-api-search.js
// API docs: https://developer.github.com/v3/search/ | |
// search docs: https://help.github.com/en/github/searching-for-information-on-github/searching-on-github | |
// you might have to limit the number of requests | |
// if trying to send too many at once | |
const request = require('request'); | |
const _ = require('lodash'); | |
const fs = require('fs'); |
View nominatim-reverse-geocode.js
const fs = require('fs'); | |
const request = require('request'); | |
const customHeaderRequest = request.defaults({ | |
headers: { 'User-Agent': 'Reverse geocode search' } | |
}); | |
let output = ''; | |
// expected input format in input_data.csv |
View inject-ie-grid.js
const ua = window.navigator.userAgent; | |
const isIE = /MSIE|Trident/.test(ua); | |
if (!isIE) return; | |
const styleElement = document.createElement("style"); | |
styleElement.setAttribute("type", "text/css"); | |
const grid = { rows: 2, cols: 4 }; | |
let styleContent = `#grid {display: -ms-grid; -ms-grid-columns: (1fr)[${grid.cols}]; -ms-grid-rows: (1fr)[${grid.rows}];}`; |
View export-sync-bookmarks.js
const fs = require("fs"); | |
const path = require("path"); | |
function newItem(name, url) { | |
return { name, url }; | |
} | |
const bookmarkPath = path.join( | |
process.env.HOME, | |
"/Library/Application Support/Google/Chrome/Default/Bookmarks" |
View build
#!/bin/bash | |
# clean dist directory and copy all files from src | |
rm -rf dist && mkdir dist | |
cp -a src/. dist/ | |
### images | |
# declare sizes | |
declare -a sizes=('710' '1000' '1420') |