Skip to content

Instantly share code, notes, and snippets.

View gist:3153350

I've only spent half a day with it, but my first impressions are thus. It's partly about Android, since this is my first Android device, and partly about the Nexus itself.

The good

  • It's small! It's comfortable to hold in one hand, and the keyboard is a great size — where touchscreen phones are too small for proper two-thumbed typing, and where it can sometimes (with my tiny hands at least) be occasionally difficult to reach the middle of the keyboard on iPad, I've found the keyboard on the Nexus to be a great size. Swype adds some icing to the already-nice cake.

  • Build quality is excellent; it has a satisfying heft without being heavy, the leathery-plastic back is nice and grippy, and it just generally feels solid and well-constructed — in absolute terms, not just for its price point.

  • The screen is lovely; side-by-side with a retina iPad it's perhaps slightly inferior but as general usage goes it's an absolute pleasure. When you consider the cost, it's absolutely phenomenal.

@robmiller
robmiller / gist:4037534
Created Nov 8, 2012
Error when installing consular-iterm gem
View gist:4037534
This file has been truncated, but you can view the full file.
ERROR: Error installing consular-iterm:
ERROR: Failed to build gem native extension.
/Users/rob/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
extconf.rb:44: Use RbConfig instead of obsolete and deprecated Config.
create /Users/rob/.rvm/gems/ruby-1.9.3-p194/gems/rb-appscript-0.6.1/src/osx_ruby.h ...
create /Users/rob/.rvm/gems/ruby-1.9.3-p194/gems/rb-appscript-0.6.1/src/osx_intern.h ...
creating Makefile
@robmiller
robmiller / gist:4581651
Created Jan 20, 2013
How to gzip certain files in nginx
View gist:4581651
server {
listen 80;
root /var/www/vhosts/example.com/;
index index.html;
location ~ "\.(css|js|txt|html)$" {
gzip on;
}
}
@robmiller
robmiller / gist:4581672
Created Jan 20, 2013
Sample gzipping in Apache
View gist:4581672
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css application/x-javascript application/javascript text/javascript
</ifmodule>
@robmiller
robmiller / git-cleanup-repo
Last active Oct 22, 2021
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
View git-cleanup-repo
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch
@robmiller
robmiller / .vimrc
Last active Jul 7, 2021
Autoload sessions created by tpope's vim-obsession when starting Vim.
View .vimrc
augroup sourcesession
autocmd!
autocmd VimEnter * nested
\ if !argc() && empty(v:this_session) && filereadable('Session.vim') |
\ source Session.vim |
\ endif
augroup END
@robmiller
robmiller / poll.sh
Last active Dec 15, 2015
ZSH one-liner to poll every five seconds to see whether a site is updated. Replace "example.com" with your domain, obviously. Relies on your site sending sensible "Age" headers.
View poll.sh
while true; do [[ `curl -ILs http://example.com/ | grep 'Age:' | sed 's/Age: //'` < 10 ]] && say "It updated"; sleep 5; done
View plugin.php
<?php
/* Plugin Name: Damn Vulnerable WordPress Plugin
* Description: Intentionally vulnerable plugin for plugin author education
* Version: 0.1
* Plugin URI: http://make.wordpress.org/plugins/2013/04/09/intentionally-vulnerable-plugin/
* Author: Jon Cave
* Author URI: http://joncave.co.uk
* License: GPLv2+
*
* DO NOT RUN THIS PLUGIN ON AN INTERNET ACCESSIBLE SITE
@robmiller
robmiller / .gitconfig
Created Apr 9, 2013
A git alias to find out what changes were introduced by the last merge.
View .gitconfig
# usage, e.g.:
# git difftool `git last-merge`
# or:
# git log `git last-merge`
last-merge = "!echo $(git log -1 --merges --pretty=format:%P | cut -d' ' -f1)..$(git log -1 --merges --pretty=format:%P | cut -d' ' -f2)"
@robmiller
robmiller / .gitconfig
Last active May 20, 2020
Want to find out what changes were introduced by a particular merge commit? Hey, so do I! ALL THE TIME. These aliases will do that.
View .gitconfig
# `git merge-log` shows the commits that were introduced in a given merge
# `git merge-diff` shows the actual changes that were introduced by a given merge
# Both commands accept an optional commitish; if ommitted, the last merge commit is used
merge-span = "!f() { echo $(git log -1 $2 --merges --pretty=format:%P | cut -d' ' -f1)$1$(git log -1 $2 --merges --pretty=format:%P | cut -d' ' -f2); }; f"
merge-log = "!git log `git merge-span .. $1`"
merge-diff = "!git diff `git merge-span ... $1`"
merge-difftool = "!git difftool `git merge-span ... $1`"