Skip to content

Instantly share code, notes, and snippets.

View bzitzow's full-sized avatar

Brian Zitzow bzitzow

  • BRIAN ZITZOW
  • Roseville, California
View GitHub Profile
@bzitzow
bzitzow / settings.json.md
Last active March 8, 2023 03:26
vscode format on save prettier
{
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
        "source.fixAll": true,
        "source.organizeImports": true,
    },
    "editor.defaultFormatter": "esbenp.prettier-vscode",
}
We couldn’t find that file to show.

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
bzitzow / promotion-api.md
Last active July 18, 2019 21:01
POST /checkout/carts/promotion.json
{ 
   "checkoutResponse":{ 
      "cart":{ 
         "id":"1",
         "items":[ 
            { 
               "id":"313fb143-3478-4a4c-b688-e3cb5dcdaa62",
               "catalog":"19",
               "sku":"4380192",
@bzitzow
bzitzow / phx-1.4-upgrade.md
Last active October 10, 2018 21:42 — forked from chrismccord/phx-1.4-upgrade.md
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
bzitzow / 0_readme.md
Created September 25, 2017 15:48 — forked from gakuzzzz/0_readme.md
MapStreamSyntax

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

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

具体例を見てもらえばどの辺が便利なのか伝わるでしょうか?

Case.1

// JDK標準APIのみ
public Map<Integer, String> Case1_Before(final Map<Integer, String> map) {
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

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
bzitzow / gist:9056b9147698f171eb2d
Created May 23, 2014 22:26
Phonegap SQLite Database Schema Migrations
//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) {
/**
* Example of using an angular provider to build an api service.
* @author Jeremy Elbourn (jelbourn@google.com)
*/
/** Namespace for the application. */
var app = {};
/******************************************************************************/