Skip to content

Instantly share code, notes, and snippets.

💭
on windoze

Drew Lustro drewlustro

💭
on windoze
Block or report user

Report or block drewlustro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@drewlustro
drewlustro / index.js
Created Nov 14, 2018
Art Institute of Chicago Scraper - scrapes Creative Commons Zero (CC0) licensed artworks with puppeteer and downloads images
View index.js
const puppeteer = require("puppeteer");
const fs = require("fs");
const request = require("request");
let scrapeUrls = async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
page.setViewport({ width: 1600, height: 1200 });
await page.goto('https://www.artic.edu/collection?is_public_domain=1')
@drewlustro
drewlustro / solr.rb
Created Jul 19, 2018 — forked from magnusvk/solr.rb
Homebrew Formula for Solr 6.0.0
View solr.rb
class Solr < Formula
desc "Enterprise search platform from the Apache Lucene project"
homepage "https://lucene.apache.org/solr/"
url "https://www.apache.org/dyn/closer.cgi?path=lucene/solr/6.0.0/solr-6.0.0.tgz"
mirror "https://archive.apache.org/dist/lucene/solr/6.0.0/solr-6.0.0.tgz"
sha256 "abf5ae9f16a752ddbb2184c97ce62249a0d9f28642c62fa3333adc1c27916672"
bottle :unneeded
depends_on :java
@drewlustro
drewlustro / .zpreztorc
Created Jan 5, 2018
My .zpreztorc on SAGE (2013 rMPB)
View .zpreztorc
#
# Sets Prezto options.
#
# Authors:
# Drew Lustro <drewlustro@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
@drewlustro
drewlustro / batch-flac-mp3-convert.sh
Created Aug 25, 2017
Multicore sox conversion of FLAC to 320 kbps LAME MP3 CBR
View batch-flac-mp3-convert.sh
#!/usr/bin/env bash
find . -type f -iname '*.flac' -print0 | xargs -0 -n 1 -P 8 -I {} sox {} -C 320 -V2 {}.mp3
@drewlustro
drewlustro / Remapkey.bat
Created Aug 1, 2017
Run cmd.exe as administrator in Windows and use this tool to remap any modifier keys to macOS
View Remapkey.bat
Remapkey.exe
View part-of-artist.js
componentDidMount: function () {
var that = this;
$.ajax({
url: '/api/artists',
type: 'GET',
success: function (result) {
that.setState({
artists: result
});
@drewlustro
drewlustro / svn-repo-restore.log
Created Sep 21, 2016
Damn... so close mso. I forgot that /repo exist when I dumped the server :\
View svn-repo-restore.log
~/dev-local/makeshift-online/site/live
☻ svn info master a685ae7 ✗
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: The working copy at '/Users/drew/dev-local/makeshift-online/site/live'
is too old (format 8) to work with client version '1.9.4 (r1740329)' (expects format 31). You need to upgrade the working copy first.
~/dev-local/makeshift-online/site/live
☻ svn upgrade master a685ae7 ✗
svn: E155019: Can't upgrade '/Users/drew/dev-local/makeshift-online/site/live' as it is not a working copy root, the root is '/Users/drew/dev-local/makeshift-online/site'
@drewlustro
drewlustro / raspi-util-functions.sh
Created Sep 8, 2016
Dump/Restore Raspberry Pi SD card image on OS X terminal
View raspi-util-functions.sh
# subset of functions.sh from https://github.com/drewlustro/dotfiles
# put in your .bash_profile or .zshrc
function toolbelt-raspi-image-dump() {
local now=$(date +"%Y-%m-%d__%H-%M-%S");
local host=${2:="raspi"};
local diskNumber=${1:--1}
local bs="1M"
local cmd="sudo dd if=/dev/rdisk$1 bs=$bs | gzip > ~/Desktop/$host-$now.pi.gz"
local usage="Usage: $0 [sdCardDiskN] [hostname='raspi']"
@drewlustro
drewlustro / lowercase-files.sh
Created Aug 25, 2016
Batch change filename/extension to lowercase
View lowercase-files.sh
# http://stackoverflow.com/questions/7787029/how-do-i-rename-all-files-to-lowercase
for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done
@drewlustro
drewlustro / install.sh
Last active Feb 15, 2016 — forked from ewnd9/install.sh
google's deepdream ubuntu installation
View install.sh
# sources
# http://www.scipy.org/install.html
# http://sohliloquies.blogspot.ru/2015/07/setting-up-deep-dream-google-researchs.html
# https://github.com/BVLC/caffe/wiki/Ubuntu-14.04-VirtualBox-VM
# ~2gb dependencies
mkdir deep-dream && cd deep-dream
sudo apt-get install -y subversion cmake
You can’t perform that action at this time.