Skip to content

Instantly share code, notes, and snippets.

View pguillory's full-sized avatar

Preston Guillory pguillory

  • Pinterest
  • San Francisco
View GitHub Profile
.nav-item {
&:nth-child(1) {
@media {min-width: 200px) {
display: none;
}
}
&:nth-child(2) {
@media {min-width: 250px) {
display: none;
@pguillory
pguillory / text.md
Last active March 19, 2017 23:39
Internet Explorer quirk: HTML entities in URLs

Try going into your browser console and typing:

window.location = 'http://causes.com/?a=true&not_a=false'

Now look at your address bar. What you see depends on which browser you're using.

Chrome, Firefox: http://www.causes.com/?a=true&not_a=false

I.
THE LIFE AND DEATH OF SCYLD.
{The famous race of Spear-Danes.}
Lo! the Spear-Danes' glory through splendid achievements
The folk-kings' former fame we have heard of,
How princes displayed then their prowess-in-battle.
@pguillory
pguillory / game.ex
Last active February 25, 2016 07:29
defmodule Game do
# Client
def start do
spawn &Game.play/0
end
def move(pid, request) do
send(pid, {:request, self, request})
receive do
@pguillory
pguillory / output.txt
Last active June 14, 2016 16:51
Built-in macros expanding to invalid code
case(:condition) do
x when x in [false, nil] ->
nil
_ ->
:ok
end
case(:condition) do
x when Enum.member?([false, nil], x) ->
nil
_ ->