Skip to content

Instantly share code, notes, and snippets.

@mkuklis
mkuklis / lambda-image-resizer.js
Created July 31, 2018 17:53
AWS Lambda for image resizing with sharp
const sharp = require('sharp');
const aws = require('aws-sdk');
const s3 = new aws.S3();
const Bucket = "BucketName";
const transforms = [
{ name: 'small', size: 85 },
{ name: 'medium', size: 160 },
{ name: 'large', size: 250 },
];
@noygal
noygal / Windows Subsystem for Linux version 1 and 2 (WSL) - node install guide.md
Last active February 21, 2024 23:17
Installing node via windows subsystem for linux

Windows 10 version 2004 - Installing Node.js on Windows Subsystem for Linux (WSL/WSL2)

UPDATE (Fall 2020): This gist is an updated version to the Windows 10 Fall Creators Update - Installing Node.js on Windows Subsystem for Linux (WSL) guide, I usually just keep here notes, configuration or short guides for personal use, it was nice to know it also helps other ppl, I hope this one too.

Windows updated windows subsystem for linux to version 2, as the F.A.Q stated you can still use WSL version 1 side by side with version 2. I'm not sure about existing WSL machines surviving the upgrade process, but as always backup and 🤞. NOTE: WSL version 1 is not replace/deprecated, and there ar

@jpolete
jpolete / us-states.sql
Created January 29, 2017 22:22
SQL to create a MySQL table of U.S. states and abbreviations
CREATE TABLE `states` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` char(2) NOT NULL DEFAULT '',
`name` varchar(128) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into states (code,name) values ('AL','Alabama');
insert into states (code,name) values ('AK','Alaska');
insert into states (code,name) values ('AS','American Samoa');