Skip to content

Instantly share code, notes, and snippets.

View AnatoliyLitinskiy's full-sized avatar

Anatoliy Litinskiy AnatoliyLitinskiy

View GitHub Profile
@AnatoliyLitinskiy
AnatoliyLitinskiy / monokai.md
Last active May 9, 2023 18:01 — forked from r-malon/monokai.md
Monokai colors in RGB and HEX format, taken from Sublime Text 3

Monokai (My modification) Colors in RGB and HEX format

#272822#679D47#F8F8F2#E6DB74#A6E22E#FD971F#9e86c8#b05279#66D9EF

  • Background: (39, 40, 34); #272822 #272822
  • Comments: (103,157,71); #679D47 #679D47
  • White: (248, 248, 242); #F8F8F2 #F8F8F2
  • String: (230, 219, 116); #E6DB74 #E6DB74
  • Green:(166, 226, 46); #A6E22E ![#A6E22E](https://placehold.co/15x15/A6E
@AnatoliyLitinskiy
AnatoliyLitinskiy / imagedata-to-filename.js
Created September 23, 2016 17:10 — forked from iwek/imagedata-to-filename.js
Convert CANVAS data to binary data and then to a filename using a Blob
function binaryblob(){
var byteString = atob(document.querySelector("canvas").toDataURL().replace(/^data:image\/(png|jpg);base64,/, ""));
var ia = new Uint8Array(ab);
for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
var dataView = new DataView(ab);
var blob = new Blob([dataView], {type: "image/png"});
var DOMURL = self.URL || self.webkitURL || self;
var newurl = DOMURL.createObjectURL(blob);
@AnatoliyLitinskiy
AnatoliyLitinskiy / TODO.md
Created April 4, 2016 17:16 — forked from uupaa/TODO.md
TODO
  • TODO
  • TODO
@AnatoliyLitinskiy
AnatoliyLitinskiy / bounds.js
Last active August 29, 2015 14:27 — forked from mapsense-examples/bounds.js
Drag & drop geojson to map
// Hat tip Mike Bostock: https://github.com/mbostock/polymaps/blob/master/examples/bounds/bounds.js
function bounds(features) {
var i = -1,
n = features.length,
geometry,
bounds = [{lon: Infinity, lat: Infinity}, {lon: -Infinity, lat: -Infinity}];
while (++i < n) {
//geometry = features[i].data.geometry;
geometry = features[i].geometry;