Skip to content

Instantly share code, notes, and snippets.

@jamesacklin
jamesacklin / make-wallpaper.sh
Last active January 19, 2022 15:56
Make a desktop-sized image from any picture
#!/bin/bash
source=$1
dest=${source::-4}_wp.jpg
colors=($(convert $source +dither -colors 2 -define histogram:unique-colors=true -format "%c" histogram:info: | awk '//{print $3}'))
convert $source \
-gravity center \
-resize 1280x1280 \
-bordercolor ${colors[1]} \
Post
author posts new standard -> New & Default
author posts new special -> New & Enhanced
Standard
New & Default
user revisits home page -> Default
Default*
Special
New & Enhanced
user revisits home page -> Enhanced
@jamesacklin
jamesacklin / SketchSystems.spec
Last active September 26, 2018 19:03
Application
Application
Logged Out
log in -> Logged In
Logged In
log out -> Logged Out
Presentation&
Title
Untitled*
Name Address City State ZIP
76 8615 W Flamingo Rd Las Vegas NV 89147
76 3670 Paradise Rd Las Vegas NV 89109
76 4708 W Charleston Blvd Las Vegas NV 89102
76 9111 S Las Vegas Blvd Las Vegas NV 89123
76 7690 S Durango Dr Las Vegas NV 89113
76 4120 W Desert Inn Rd Las Vegas NV 89102
76 1571 N Buffalo Dr Las Vegas NV 89128
76 804 E Flamingo Rd Las Vegas NV 89119
76 5660 Boulder Hwy Las Vegas NV 89122
@jamesacklin
jamesacklin / hosts
Created November 20, 2016 18:46
Hosts file entries to block Facebook and Twitter
# Block Twitter
0.0.0.0 twitter.com
# Block Facebook IPv4
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
@jamesacklin
jamesacklin / tativille.json
Last active February 13, 2016 17:15
Posts grabbed from the now-extinct Tati Cycles blog via the Tumblr API.
{"meta":{"status":200,"msg":"OK"},"response":{"blog":{"title":"T A T I V I L L E","name":"facteur","posts":20,"url":"http:\/\/taticycles.com\/","updated":1428118700,"description":"","is_nsfw":false,"ask":false,"ask_page_title":"Ask me anything","ask_anon":false,"share_likes":false},"posts":[{"blog_name":"facteur","id":113722580794,"post_url":"http:\/\/taticycles.com\/post\/113722580794\/1-fits","slug":"1-fits","type":"text","date":"2015-03-15 20:56:26 GMT","timestamp":1426452986,"state":"published","format":"html","reblog_key":"g7a2KBt1","tags":["Serotta","Fits","Blackstone","Velosmith"],"short_url":"http:\/\/tmblr.co\/ZmWRCl1fwPDyw","summary":"$1 Fits","recommended_source":null,"recommended_color":null,"highlighted":[],"note_count":7,"title":"$1 Fits","body":"\u003Cp\u003EWe now live in the age of the $400 fit session. Let that sink in.\u003C\/p\u003E\u003Cp\u003EThere is a lot to cover, and a lot to talk about, when it comes to the business and science of properly fitted bicycles. But there are plenty of pl
@jamesacklin
jamesacklin / jekyll-images-figure.js
Created November 5, 2015 20:32
Modify Jekyll on Github Pages' image & alt-text behavior to work with figures and figcaptions
<script>
/* Pulls images with alt text out of paragraphs, puts them into <figure> elements with <figcaption>s */
var imgs = document.querySelectorAll('article p img');
[].forEach.call(imgs, function(e){
var d = document.createElement('figure');
d.innerHTML = '<img src="' + e.src + '" alt="' + e.alt + '"><figcaption>' + e.alt + '</figcaption>';
e.parentNode.insertBefore(d, e);
e.parentNode.removeChild(e);
});
</script>
{
"auto_complete": true,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment",
"auto_complete_size_limit": 4194304,
"auto_complete_with_fields": true,
"bh_toggle_enable": true,
"binary_file_patterns":
[
"*.jpg",

Keybase proof

I hereby claim:

  • I am jamesacklin on github.
  • I am jamesacklin (https://keybase.io/jamesacklin) on keybase.
  • I have a public key whose fingerprint is ED3E D300 DFE9 9831 3BE7 5550 F89D 7FD1 7928 6AC5

To claim this, I am signing this object:

@jamesacklin
jamesacklin / gulpfile.js
Created February 25, 2015 20:45
Gulpfile
var gulp = require('gulp');
var mainBowerFiles = require('main-bower-files');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var compass = require('gulp-compass');
var minify = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var clean = require('gulp-clean');
var browserSync = require('browser-sync');