defp deps do
[{:phoenix, "~> 1.2.1"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.0"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 2.6"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"},
View gist:267f341a388845583e8c
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
PS1='\[\e[1;36m\][\u@\h \W]\$\[\e[0m\] ' |
View gist:eafeee5b31de84bfa472
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
redis-server /usr/local/etc/redis.conf |
View SassMeister-input-HTML.html
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
<div class="row"> | |
<select> | |
<option value="hydrogen" class=>hydrogen</option> | |
<option value="lithium" class=>lithium</option> | |
<option value="helium" class=>helium</option> | |
<option value="nitrogen" class=>nitrogen</option> | |
<option value="carbon" class=>carbon</option> | |
<option value="oxygen" class=>oxygen</option> | |
<option value="nitrogen" class=>nitrogen</option> | |
</select> |
View index.ios.js
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, |
View joseph.exs
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 Joseph do | |
@moduledoc """ | |
This is my module for the challenges from Elixir TV episode 6 | |
""" | |
@doc """ | |
Reduces a list to a single value from running a function. | |
Returns an numeric value. | |
View MainPage.cs
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
using ReactNative; | |
using ReactNative.Modules.Core; | |
using ReactNative.Modules.RNDeviceInfo; | |
using ReactNative.Shell; | |
using System.Collections.Generic; | |
namespace AwesomeProject | |
{ | |
class MainPage : ReactPage | |
{ |
View deprecation_message.ex
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
# Programming Phoenix Version: P1.0 (April 2016) | |
# I have the following changeset for my User model: | |
def changeset(model, params \\ :empty) do | |
model | |
|> cast(params, ~w(name username), []) | |
|> validate_length(:username, min: 1, max: 20) | |
end | |
# but I get the following deprecation warning |
View mix.md
View lecture1.ex
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 Lecture1 do | |
def add(list), do: add(list, 0) | |
defp add([h | t], acc), do: add(t, acc + h) | |
defp add([], acc), do: acc | |
def mult(list), do: mult(list, 1) | |
defp mult([h | t], acc), do: mult(t, acc * h) | |
defp mult([], acc), do: acc | |
end |
View game_of_life.rb
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
class GameOfLife | |
attr_reader :height, :width | |
def initialize | |
@board = { | |
[10,10] => true, | |
[10,11] => true, | |
[10,12] => true, | |
} | |
@height = 40 |
OlderNewer