This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Type jj in insert mode to escape to command mode | |
:imap jj <Esc> | |
" Type j; in insert mode to escape to command mode with a : already typed | |
:imap j; <Esc>: | |
" Type ;w in insert mode to escape to command mode with :w already typed | |
:imap ;w <Esc>:w | |
" Use semicolon instead of colon. Don't have to hit shift now | |
map ; : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Colleague::Classes | |
class CitizenshipStatus | |
include Processor | |
def process_field(value) | |
AlienStatus.find_code( value ) | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sky-label { | |
input, textarea { /* How the input looks without focus or text */ } | |
label { /* How the input looks without focus or text */ } | |
} | |
.sky-label-focused, .sky-label-has-text { | |
input, textarea { /* How the inputs look while focused or with text (and blurred) */ } | |
label {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule AnnouncementChannelTest do | |
use ConstableApi.TestWithEcto, async: false | |
alias Phoenix.Socket | |
alias Phoenix.Socket.Message | |
alias ConstableApi.Repo | |
alias ConstableApi.Announcement | |
alias ConstableApi.AnnouncementChannel | |
test "announcements:index returns announcements with ids as the key" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@moduledoc File.read!("README.md") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Works great in test/test_helper.exs | |
:erlang.system_flag :backtrace_depth, 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text-rendering: optimizeLegibility; | |
-webkit-font-smoothing: antialiased; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.CommentView do | |
use MyApp.Web, :view | |
@attributes ~W(id name inserted_at) | |
def render("index.json", %{data: comments}) do | |
for comment <- comments, do: render("show.json", %{data: comment}) | |
end | |
def render("show.json", %{data: comment}) do | |
comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def with_sorted_comments do | |
from a in Announcement, | |
left_join: c in assoc(a, :comments), | |
left_join: u in assoc(c, :user), | |
order_by: [asc: c.inserted_at], | |
preload: [:interests, :user, comments: {c, user: u}] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"<?xml version=\"1.0\" encoding=\"utf-8\"?><cfdi:Comprobante xsi:schemaLocation=\"http://www.sat.gob.mx/cfd/3 http://www.sat.gob.mx/sitio_internet/cfd/3/cfdv32.xsd\" version=\"3.2\" folio=\"22\" LugarExpedicion=\"NOGAL 10 , SAN JOSE DE LOS CEDROS, 05200, DELEGACION CUAJIMALPA, DISTRITO FEDERAL, MEXICO\" NumCtaPago=\"NO IDENTIFICADO\" TipoCambio=\"1.00\" Moneda=\"Peso Mexicano\" fecha=\"2014-01-29T20:41:07\" sello=\"gO/DyxBs7kneK2dRySKmKshc1ddFXj+XcoPUrlgHYNyGeeuXGHW81URpiy20wIMpUmtZf8yne+5+jHMTqachVghB4IRkJwUNiFNPmc5K/vxiY/VWzalzQtrkBKZh7LWs/yrinvoiP1H4h8t/yOsiw+8NRwSDfcV6g70b3jnZRKg=\" formaDePago=\"PAGO EN UNA SOLA EXHIBICION\" noCertificado=\"00001000000301474075\" certificado=\"MIIEdzCCA1+gAwIBAgIUMDAwMDEwMDAwMDAzMDE0NzQwNzUwDQYJKoZIhvcNAQEFBQAwggGKMTgwNgYDVQQDDC9BLkMuIGRlbCBTZXJ2aWNpbyBkZSBBZG1pbmlzdHJhY2nDs24gVHJpYnV0YXJpYTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMR8wHQYJKoZIhvcNAQkBFhBhY29kc0BzYXQuZ29iL |
OlderNewer