Skip to content

Instantly share code, notes, and snippets.

View chukon's full-sized avatar

Chuck Konkol chukon

View GitHub Profile
@chukon
chukon / keybase.md
Last active February 16, 2017 01:06

Keybase proof

I hereby claim:

  • I am chukon on github.
  • I am chuckkonkol (https://keybase.io/chuckkonkol) on keybase.
  • I have a public key whose fingerprint is 46EA B10D 6A0B 7F6A 9344 4F62 9E5F A082 32BC B63B

To claim this, I am signing this object:

test

@chukon
chukon / what-to-wear.js
Last active October 20, 2018 03:56 — forked from monkbroc/what-to-wear.js
What to wear
function forecastUrl(apiKey, location) {
var apiUrl = "https://api.darksky.net/forecast";
var excludeFields = "exclude=minutely,hourly&si";
return apiUrl + "/" + apiKey + "/" + location + "?" + excludeFields;
}
function getForecast(url) {
var got = require("got");
return got(url)
.then(function (response) {
@chukon
chukon / clipboard-paste-image.js
Created March 5, 2020 05:09 — forked from dusanmarsa/clipboard-paste-image.js
JavaScript - Clipboard API - Paste image handler
var IMAGE_MIME_REGEX = /^image\/(p?jpeg|gif|png)$/i;
var loadImage = function (file) {
var reader = new FileReader();
reader.onload = function(e){
var img = document.createElement('img');
img.src = e.target.result;
var range = window.getSelection().getRangeAt(0);
range.deleteContents();
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';