Skip to content

Instantly share code, notes, and snippets.

@chrismccord
chrismccord / phx-1.4-upgrade.md
Last active October 14, 2024 09:32
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:

// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class

This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:

  • Hulu / HuluPlus
  • CBS
  • ABC
  • MTV
  • theWB
  • CW TV
  • Crackle
  • NBC
@beshkenadze
beshkenadze / 101.txt
Created March 13, 2012 10:30
101 совет по авиаперелетам
1. Билеты, купленные сильно заранее, дешевле только у лоукостов.
2. Чтоб купить дешево билет в нормальной компании, нужно заранее мониторить ценообразование.
3. Часто цена на билет может упасть примерно за 2 недели до вылета, а потом за несколько дней до вылета снова может вырасти.
4. Цена по одним направлениям в разные сезоны у разных авиакомпаний может быть разная.
5. Часто цена на momondo, expedia и aviasales ниже, чем на сайте авиакомпании. Но не всегда.
В аэропорту
6. Часто можно зарегистрироваться на стойке для бизнес класса, если там никого нет.
7. Большинство людей в аэропорту следуют общему потоку.
@chetan
chetan / yardoc_cheatsheet.md
Last active October 17, 2025 13:49
YARD cheatsheet
@codebrew
codebrew / assets.js.erb
Created November 29, 2011 20:31
javascript asset helper
// helper to create proper asset paths if an asset host is configured
App.assets = {
assets : {
<% AssetsUtil.images.each do |img| %>
"<%= img %>" : "<%= asset_path(img) %>",
<% end %>
},
@overbalance
overbalance / Rakefile
Created June 2, 2011 21:17
Middleman Rake Tasks
require 'rubygems'
desc "Completely empty /build"
task :clobber do
sh "rm -rf build/* build/.[Dh]*"
end
desc "Export compiled build"
task :build do
sh "mm-build"