Skip to content

Instantly share code, notes, and snippets.

View kristianfreeman's full-sized avatar
🙃

Kristian Freeman kristianfreeman

🙃
View GitHub Profile
{{#if confirming}}
<button class="btn btn-danger" {{action 'confirm'}}>Are you sure?</button>
{{else}}
<button class="btn btn-primary" {{action 'startConfirming'}}>{{text}}</button>
{{/if}}
- Replace any partial roll of toilet paper with a fresh one
- Gather all signs, placards, ads, offers, ?magazines,? Gideon Bibles, or other marketing materials strewn throughout the room; place in lowest dresser drawer; close (and optionally duct-tape) drawer
- Collect all fake plants, fake art objects, and other distracting kipple; place in closet; close closet door
- On one newly marketing-free surface, prominently place photo of family you miss
- Hang up thing to wear tomorrow; if wrinkled, hang in bathroom with shower running
@kristianfreeman
kristianfreeman / download.rb
Last active August 29, 2015 14:02
batch download for nsscreencasts
require 'nokogiri'
require 'open-uri'
# if File.exist?(".env")
# `source .env`
# else
# puts "Couldn't find '.env'. Make sure NS_FEED env. variable is set."
# end
FEED = ENV["NS_FEED"]
@kristianfreeman
kristianfreeman / err.md
Created May 16, 2014 04:09
the potentially mean message to the app review dude

Hey,

I'm a little confused at the response here. Cited is "Reason 10.6": "Apple and our customers place a high value on simple, refined, creative, well thought through interfaces. They take more work but are worth it. Apple sets a high bar. If your user interface is complex or less than very good it may be rejected."

Feeling is a data capture app, so the implementation of the act of capturing data is very intentionally designed. I could have designed it for capturing as many events per day as desired, but I chose not to – that's an implementation and design detail that I feel strongly about. Besides, if a user feels like their previous rating of the day is inaccurate, they can go back and change the rating later with no consequence.

Can you explain to me why you feel that this is a example of poor user experience? As far as I can tell, this has nothing to do with user experience; if, hypothetically, you could record multiple events per day, they would appear exactly the same as five days' worth would

@kristianfreeman
kristianfreeman / selecta_ag.vim
Created May 13, 2014 20:50
really, really fast vim filtering
" Requirements:
" selecta: https://github.com/garybernhardt/selecta
" ag: https://github.com/ggreer/the_silver_searcher
" Run a given vim command on the results of fuzzy selecting from a given shell
" command. See usage below.
function! SelectaCommand(choice_command, selecta_args, vim_command)
try
silent let selection = system(a:choice_command . " | selecta " . a:selecta_args)
catch /Vim:Interrupt/

2014-05-07

  • Intro message is shown on first opening
  • Graph is disabled on first run
  • Table is disabled on first run
  • Music should be enabled
  • Can accept rating
  • Can accept note
  • Can accept picture
  • Can take picture
@kristianfreeman
kristianfreeman / bootstrap.sh
Last active August 29, 2015 13:59
bootstrapping without scary devops tools because #retro
echo "Checking for requirements:"
if [ -d "/Applications/Xcode.app/Contents/Developer" ]; then
XCODE_FOUND=true
echo "\t✓ Found Xcode.app."
else
echo "\t✗ Missing Xcode.app. Install it from the App Store."
echo "In Terminal? Command + Double click to open Xcode.app in the Mac App Store."
echo "http://appstore.com/mac/xcode"
exit 1
@kristianfreeman
kristianfreeman / secretz.rb
Created April 4, 2014 18:32
example code to make all soundcloud playlists/tracks private
client = Soundcloud.new(access_token: access_token)
#tracks
tracks = client.get '/me/tracks'
tracks.each do |track|
# obviously this logic is pretty simple, so it can be reversed easily
if track.sharing == "public"
client.put(track.uri, track: {
sharing: 'private'
})
@kristianfreeman
kristianfreeman / examples.rb
Created April 2, 2014 02:25
easy currency in rails
product = Product.new price_cents: 5000
product.price_string # => "$50.00"
product = Product.new price_cents: 51254
product.price_string # => "$512.54"
product = Product.new price_cents: 512
product.price_string # => "$5.12"
@kristianfreeman
kristianfreeman / wwdc_rename.rb
Created March 18, 2014 16:32
Renaming script for WWDC 2013 videos
class WWDC
NAMES = {
"100" => "Keynote",
"101" => "Platforms State of the Union",
"102" => "Apple Design Awards",
"109" => "Painting the Future",
"200" => "Accessibility in OS X",
"201" => "Building User Interfaces for iOS 7",
"202" => "Accessibility in iOS",
"203" => "What's New in Cocoa Touch",