Skip to content

Instantly share code, notes, and snippets.

View inlikealion's full-sized avatar

Matt Bainton inlikealion

View GitHub Profile
@inlikealion
inlikealion / webp-batch.sh
Created October 22, 2020 12:14
sh one-liners for batch-conversion of images to webp via cwebp
# One-liners:
# See: https://www.smashingmagazine.com/2018/07/converting-images-to-webp/
## JPG
find ./ -type f -name '*.jpg' -exec sh -c 'cwebp -q 80 $1 -o "${1%.jpg}.webp"' _ {} \;
## PNG
find ./ -type f -name '*.png' -exec sh -c 'cwebp -q 80 $1 -o "${1%.png}.webp"' _ {} \;
@inlikealion
inlikealion / Procfile
Created August 5, 2020 15:10
Example Procfile for running our Rails sites locally with Overmind
web: rails server
redis: redis-server
search: elasticsearch
@inlikealion
inlikealion / _mixin-svgcolor.scss
Last active August 29, 2015 14:25
Mixin for colorizing svg and giving states.
// From:
// https://twitter.com/thisisroyal/status/624570142945579008
// http://jsfiddle.net/thisisroyal/mokv8hc2/
@mixin svgcolor($color: #000) {
[fill]:not([fill="none"]) {
fill: $color;
transition: fill 150ms ease-in-out;
}
@inlikealion
inlikealion / ui-dev-setup
Last active September 22, 2015 14:34
Setup for Torque UI Developers
# UI Development Setup
## Applications
+ [iTerm](https://iterm2.com/)
- Zsh instead of Bash via [Oh My Zsh](http://ohmyz.sh/)
+ [Atom](https://atom.io/)
## Environments
@inlikealion
inlikealion / tabs.js
Last active August 29, 2015 14:16
Simple tabs.
$(document).ready(
/**
* Tabs
*/
$('.js-tabs').each(function(){
// For each set of tabs, we want to keep track of
// which tab is active and it's associated content
var $active, $content, $links = $(this).find('a');
// If the location.hash matches one of the links, use that as the active tab.
@inlikealion
inlikealion / html5-snippet.html
Created July 24, 2014 21:20
Bare html5 snippet
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
</head>
<body>

Keybase proof

I hereby claim:

  • I am inlikealion on github.
  • I am inlikealion (https://keybase.io/inlikealion) on keybase.
  • I have a public key whose fingerprint is E539 7DEB 5B3F 9181 CDE0 6463 86AF 0738 4294 0BB9

To claim this, I am signing this object:

@inlikealion
inlikealion / color-vars--example.scss
Created February 12, 2014 18:53
Sass color palette function from Erskine:
// http://codepen.io/erskine/pen/wLclB
// config
$_color-base-grey: rgb(229,231,234);
$palettes: (
purple: (
base: rgb(42,40,80),
light: rgb(51,46,140),
dark: rgb(40,38,65)
),
grey: (
# this way is best if you want to stay up to date
# or submit patches to node or npm
mkdir ~/local
# I use .bash_profile instead of .bashrc
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bash_profile
. ~/.bash_profile
# could also fork, and then clone your own fork instead of the official one
@inlikealion
inlikealion / Preferences.sublime-settings
Last active December 29, 2015 09:09
Sublime Text 3 - User Prefs
{
"auto_complete": true,
"bold_folder_labels": true,
"caret_style": "phase",
"close_windows_when_empty": true,
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"fade_fold_buttons": false,
"file_exclude_patterns":
[
"*.scssc",