Skip to content

Instantly share code, notes, and snippets.


Brian Zitzow bzitzow

View GitHub Profile

AutoFill Spike

Browser Support

Given that each browser does autofill and auto complete differently, identify how each of our supported browsers determines:

  • Should this input be saved for later completion
  • Should this input be auto-filled
  • Input level
  • Form level
bzitzow /
Last active Jul 18, 2019
POST /checkout/carts/promotion.json
bzitzow /
Last active Oct 10, 2018 — forked from chrismccord/
Phoenix 1.3.x to 1.4.0 Upgrade Guides

Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.

This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.

Update Phoenix and Cowboy deps

To get started, simply update your Phoenix dep in mix.exs:

{:phoenix, "~> 1.4.0-rc"}
bzitzow /
Created Sep 25, 2017 — forked from gakuzzzz/

Java8 の Stream で Map を操作するサポート作った

MapStreamSyntax というクラスで基本的に static import して使います。



// JDK標準APIのみ
public Map<Integer, String> Case1_Before(final Map<Integer, String> map) {
View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
View grok_vi.mdown

Answer by Jim Dennis on Stack Overflow question

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)

bzitzow / gist:9056b9147698f171eb2d
Created May 23, 2014
Phonegap SQLite Database Schema Migrations
View gist:9056b9147698f171eb2d
//phoneGap HTML5 SQLite database schema migration example
var db = null;
var current_migration = null;
var current_schema_version = null;
// keep migration version order
var db_migrations = {
v1: {
version: "1.0",
up: function(tx) {
View api-provider.js
* Example of using an angular provider to build an api service.
* @author Jeremy Elbourn (
/** Namespace for the application. */
var app = {};
bzitzow / gist:8343680
Last active Jan 2, 2016 — forked from Mithrandir0x/gist:3639232
Differences between Factories, Services and Provider in AngularJS
View gist:8343680
// Source:!topic/angular/hVrkvaHGOfc
// jsFiddle:
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
bzitzow / gist:7652035
Created Nov 26, 2013
Android DPI Calculator # Source:
View gist:7652035
$( function() {
function applyToInputSet( id ) {
var dpis = [ 320, 240, 160, 120, 212.8 ];
var labels = [ 'xhdpi', 'hdpi', 'mdpi', 'ldpi', 'tvdpi' ];
var inputs = $(id+' input');
inputs.each( function(i) {
if( this.value == '' ) {
this.value = '';
You can’t perform that action at this time.