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"},
This file contains hidden or 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\] ' |
This file contains hidden or 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 |
This file contains hidden or 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> |
This file contains hidden or 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, |
This file contains hidden or 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. | |
This file contains hidden or 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 | |
{ |
This file contains hidden or 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 |
This file contains hidden or 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 |
This file contains hidden or 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