Skip to content

Instantly share code, notes, and snippets.

@xiwcx
xiwcx / pillow.py
Created March 3, 2019 02:17
pillow examples
import os, sys
from PIL import Image, ImageOps
infile = "example.jpg"
square = os.path.splitext(infile)[0] + ".square.jpg"
webp = os.path.splitext(infile)[0] + ".webp"
size = (1000, 1000)
im = Image.open(infile)
square_image = ImageOps.fit(im, size, Image.ANTIALIAS)
@xiwcx
xiwcx / index.js
Created December 18, 2018 00:23
santa's little helper
const http = require('http');
const cheerio = require('cheerio');
const opn = require('opn');
let count = 0;
const options = {
host: 'www.silkparlor.com',
port: 80,
path: '/shop/',
@xiwcx
xiwcx / index.js
Last active October 29, 2018 16:31
packages.json to CSV w/ meta
const data = require('path/to/package.json')
const repoUrl = require('get-repository-url')
const scrapeIt = require('scrape-it')
const sortBy = require('lodash.sortby')
const writeCSV = require('write-csv')
// scrape it configuration to collect the number of stars and latest tagged version
// https://github.com/IonicaBizau/scrape-it#memo-documentation
const scrapeConfig = {
latest: {
@xiwcx
xiwcx / README.md
Last active July 8, 2018 20:44
the welch canavan "reset"

The Welch Canavan "Reset"

mostly so i can stop googling these things every damn time

I don't use frameworks or resets almost ever, but there are a few indispensable things I find myself reaching for (and therefore googling) constantly. #lazyweb

Keybase proof

I hereby claim:

  • I am xiwcx on github.
  • I am xiwcx (https://keybase.io/xiwcx) on keybase.
  • I have a public key whose fingerprint is E736 2FF5 D21D 19CC 9823 ACF5 C9B0 975F 4D11 D200

To claim this, I am signing this object: