Skip to content

Instantly share code, notes, and snippets.

View jvrsgsty's full-sized avatar

jvrsgsty

  • Stanford University
  • Stanford, CA
View GitHub Profile
@jvrsgsty
jvrsgsty / optimize-images.sh
Last active September 23, 2016 17:58
Optimize PNGs and JPGs in a directory using pngcrush and jpegtran
#!/bin/bash
for f in *.png; do pngcrush -rem alla -reduce -brute $f $f.new; done;
for f in *.jpg; do jpegtran -copy none -optimize $f > $f.new; done;
rm *.png
rm *.jpg
for f in *.new; do mv $f ${f%.*}; done;
@jvrsgsty
jvrsgsty / test.rb
Created June 6, 2017 00:03
Attempted test case of Active Record Query bug
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails",'5.0.0.1'
@jvrsgsty
jvrsgsty / Conda Cheatsheet.md
Last active October 3, 2018 17:39
Conda Cheatsheet

Notes on Conda envs and Jupyter kernels

General conda commands

conda env list
conda env remove --name some-env

Creating new conda envs

I like specifying the python version, since it will install an env-local version of