Enable JavaScript to use search. / 検索を使用するには JavaScript を有効にしてください。
Posts
Thu, December 31, 2015
1 min read
[ssh] How to fix 'Warning: the RSA host key for 'server_name' differs from the key for the IP address 'xxx'
How I cleared the ssh RSA host key mismatch warning by deleting the offending line from known_hosts.
read more →
Mon, December 28, 2015
When Google Drive files are completely deleted, Google might be able to restore them?
Google support may restore completely deleted Drive files within a limited window if you ask soon.
Wed, December 23, 2015
2 min read
[jQuery] Understanding slick.js carousel library's lazyLoad
Using slick.js's lazyLoad option and understanding the difference between ondemand and progressive modes.
Mon, December 21, 2015
[Linux] Multi-hop ssh/scp configuration
Using ProxyCommand in .ssh/config to run multi-hop ssh/scp in a single command.
Thu, December 17, 2015
Converting Mongoose documents to JSON and returning response
Use Mongoose's lean() to return documents as a JSON response from Express with res.json.
Wed, December 16, 2015
Understanding Load Average
Notes on reference articles for understanding load average on multi-core Linux systems.
Mon, December 14, 2015
[Node.js] Converting CSV to JSON files using CSVTOJSON
A small Node.js snippet that pipes csvtojson between fs read and write streams to turn a CSV file into a JSON file.
Wed, December 2, 2015
[Twitter] Capturing custom events from tweet button and executing something when clicked
A JavaScript snippet that binds a callback to the Twitter tweet button click event via twttr.events.bind.
Sat, November 28, 2015
[Mac App] Timer app 'Alinof Timer' is simple and easy to use
A short look at Alinof Timer, a simple Mac timer app I use to time internal meeting presentations.
[MongoDB] Field Naming Conventions
Since the MongoDB manual mixes snake_case and lowerCamelCase, standardize on whichever is easier for your application code.
Thu, November 5, 2015
3 min read
[Atom] How to fix 'The editor has crashed' error #AtomEditor
How I resolved Atom's 'The editor has crashed' error by uninstalling suspect packages one by one to find the culprit.
Mon, October 26, 2015
[Mongoose] Trouble with Stream Processing Only Default batchSize When Sorting by Unindexed Field
A Mongoose stream sorted by an unindexed field stops at 1000 docs — cause and workarounds.
Fri, October 9, 2015
avn: Automatically Switch Node.js Versions
Set up avn to automatically switch Node.js versions from a .node-version file when you cd into a project.
Thu, October 1, 2015
Difference Between China's Country Codes CN and C2 #country_code
The difference between PayPal's CN and C2 country codes for China, and how to use each in cross-border e-commerce.
Thu, September 24, 2015
[Heroku] Migrating to cedar-14 Stack
Migrating a Heroku app to the cedar-14 stack with heroku stack:set and an empty git commit.
Upgrading Heroku Command Version
Upgrading heroku-toolbelt to Heroku Toolbelt v4 with heroku update after stack:set was unavailable.
Wed, September 16, 2015
[Node.js] How to Fix Error: spawn ENOENT
child_process.spawn's Error: spawn ENOENT was caused by a missing ImageMagick binary.
Mon, September 14, 2015
[MongoDB] Difference Between Code 11000 and 11001 in E11000 duplicate key error index
Reproducing why MongoDB 2.4.5 returned both 11000 and 11001 for duplicate key error index, and confirming 3.0.2 unified them to 11000.
Thu, September 10, 2015
Site That Shows Global Email Client Market Share
A reference site for global email client market share, useful when deciding which clients to test HTML emails on.
Tue, September 8, 2015
[Amazon Redshift] TEXT type is converted to VARCHAR(256)
Amazon Redshift converts TEXT columns to VARCHAR(256) — a gotcha when coming from MySQL or PostgreSQL.
Mon, September 7, 2015
Chrome Extensions to Make Trello More Convenient for Scrum
Four Chrome extensions that make Trello more useful for Scrum-based Kanban.
Mon, August 31, 2015
[MongoDB] Check the dbpath where database files are stored
Look up MongoDB's dbpath from `db.serverCmdLineOpts()` in the mongo shell.
Sun, August 23, 2015
4 min read
[MySQL] Check the size of database and tables
SQL to check MySQL database and table sizes, and how to wrap it as a stored procedure.
Sat, August 22, 2015
"YAPC::Asia Tokyo 2015" 8/22(Sat) Retrospective #yapcasia
Day 2 recap of YAPC::Asia Tokyo 2015 — session notes and impressions up to the closing session.
5 min read
"YAPC::Asia Tokyo 2015" 8/21(Fri) Retrospective #yapcasia
Day 1 recap of YAPC::Asia Tokyo 2015 — session notes and impressions from the 10th and final edition.
Wed, August 19, 2015
Recommended Atom Editor Packages Summary
Recommended Atom editor packages grouped by use case, plus an apm star snippet that installs them all at once.
Sun, August 9, 2015
[Node.js] Difference between module.exports and exports
A short note on module.exports vs exports in Node.js — when in doubt, use module.exports.
Sat, August 8, 2015
Notes for learning dotinstall's "Express Introduction" on Mac right now
Notes on stumbling points when following dotinstall's Express Introduction on Mac.
Wed, August 5, 2015
Notes for learning dotinstall's "Introduction to UNIX Commands (General User Edition)" on Mac
Notes on which lessons of dotinstall's UNIX Commands course to skip on Mac and which to work through.
Tue, August 4, 2015
[JavaScript] Performance comparison of Date.now vs new Date().getTime() vs +new Date
A jsPerf comparison of Date.now vs new Date().getTime() vs +new Date. Date.now was the fastest.
Wed, July 29, 2015
[Handlebars.js] Register custom helper methods with registerHelper
Registering and unregistering custom Handlebars.js helpers with registerHelper / unregisterHelper.
Tue, July 14, 2015
[MongoDB] How to use db.runCommand( { cloneCollection } )
Clone a collection between mongod hosts with a filtered `cloneCollection` runCommand.
Sun, July 12, 2015
[WordPress] Disable XML-RPC
Disabling WordPress XML-RPC at the Nginx layer to mitigate DoS abuse.
Reference links for creating a server on Sakura Cloud
Official Sakura Cloud manual links used from account creation through server setup.
Tue, July 7, 2015
[Node.js] Stubbing Mongoose virtual attributes with sinon
Stub Mongoose virtual attributes from tests with sinon.stub plus stub.withArgs.
Sun, July 5, 2015
"HTML5 & CSS3 Lesson Book" is perfect as an introductory book
A short recommendation of 'HTML5 & CSS3 Lesson Book' — a solid introductory book for new engineers and designers.
Tue, June 30, 2015
[Node.js] Let's use stable version to avoid MONGOOSE WARNING
Fixing the !!! MONGOOSE WARNING !!! banner in a Node.js app by pinning package.json to a stable Mongoose version.
Sun, June 28, 2015
[SSH] SSH connection with users who don't have password set fails even with public key authentication only
Why SSH public key auth fails for users without a password, and how to fix it.
Thu, June 18, 2015
[Capistrano] Deploy by specifying a specific branch or commit
A quick memo for deploying a specific branch or commit with Capistrano's -S flag.
Tue, June 16, 2015
Lossless compression of JPEG images with Jpegoptim
Losslessly compress JPEGs on macOS with Jpegoptim from Homebrew, plus a one-liner for batching a whole directory.
Mon, June 15, 2015
[Git] Clone by specifying a specific branch from remote
Use git clone -b <branch> to clone straight into a specific branch from a remote repository.
Fri, June 12, 2015
Lossless compression of PNG images with OptiPNG
Using OptiPNG on macOS to losslessly compress PNGs, individually or in a batch.
Wed, June 10, 2015
Converting mp3 to mp4 using FFmpeg to upload audio files to YouTube [macOS Edition]
Combine an mp3 and a jpg into an mp4 with FFmpeg on macOS for uploading audio to YouTube.
[Atom] Package that provides syntax highlighting for Stylus
Comparing the two Atom packages for Stylus syntax highlighting and why I picked the more popular Stylus package.
Mon, June 8, 2015
[CSS] For image replacement, hide text with text-indent: 100%; white-space: nowrap; overflow: hidden;
A modern image-replacement pattern that hides text safely with text-indent: 100%.
Tue, June 2, 2015
How to Ask Questions for Learning
On asking for the method to reach an answer, rather than the answer itself, when you're still learning.
Mon, June 1, 2015
[Git] Skip .git/hooks/pre-commit when committing
Skip the pre-commit hook with git commit --no-verify (-n) when a legacy hook gets in the way.
Sat, May 30, 2015
[PHP-FPM] WARNING: [pool www] server reached pm.max_children setting (30), consider raising it
Fixing PHP-FPM's pm.max_children WARNING and Bad Gateway by raising the setting in www.conf.
Development Team Structure Retrospective (January to May 2015)
Retrospective on the H1 2015 dev team structure — what worked, what didn't, and the shift ahead.
I Cancelled My Sakura VPS
Notes on cancelling Sakura VPS and planning a migration to Sakura Cloud.