Skip to content

Instantly share code, notes, and snippets.

View darwinphi's full-sized avatar
🧑‍💻
Coding

Darwin Manalo darwinphi

🧑‍💻
Coding
View GitHub Profile
@chrismccord
chrismccord / phx-1.4-upgrade.md
Last active June 16, 2023 06:22
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.

Install the new phx.new project generator

The mix phx.new archive can now be installed via hex, for a simpler, versioned installation experience.

To grab the new archive, simply run:

@scottopolis
scottopolis / splice-object-array.js
Last active January 31, 2023 06:54
Remove object from array of objects in Javascript
// we have an array of objects, we want to remove one object using only the id property
const apps = [{id:34,name:'My App',another:'thing'},{id:37,name:'My New App',another:'things'}];
// get index of object with id of 37
const removeIndex = apps.findIndex( item => item.id === 37 );
// remove object
apps.splice( removeIndex, 1 );
@nathancolgate
nathancolgate / mime_types.rb
Last active November 18, 2018 15:17 — forked from ream88/excel_template_handler.rb
Example demonstrating the use of writeexcel gem in rails 3.2
# config/initializers/mime_types.rb
Mime::Type.register "application/vnd.ms-excel", :xls