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
FROM elixir:latest | |
# Install debian packages | |
RUN apt-get update && \ | |
apt-get install --yes build-essential inotify-tools postgresql-client git && \ | |
apt-get clean | |
ADD . /app | |
# Install Phoenix packages |
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
unless Code.ensure_compiled? MyApp.MixfileHelpers do | |
defmodule MyApp.MixfileHelpers do | |
@moduledoc """ | |
Defines functions to be shared by individual Mixfiles inside the umbrella project. | |
Since Mixfiles in an umbrella project often need to stay coordinated, this module has been introduced as a single source of truth. | |
This module should only be used for configuration that must be shared across applications. If configuration is only incidentally similar across Mixfiles, it should not be defined here. | |
In order to use these helper functions, run `Code.load_file("path/to/this/module.ex")` inside of a `mix.exs` file. This module's definition is wrapped inside a condition so that it won't be redefined when loaded multiple times. |
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
# 1 . npm install intro.js --save | |
# 2. @import '~intro.js/minified/introjs.min.css'; to styles.scss | |
# 3. add to the componenet which you want to show | |
//add declaration to the top | |
const IntroJs = require('/pathTo/node_modules/intro.js'); |
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 MyApp.Auth do | |
@moduledoc """ | |
Creates `Ueberauth.Auth` structs from OAuth responses. | |
This module is an ugly hack which is necessary because `Ueberauth` doesn't provide | |
the necessary hooks to get such a struct without giving it control of the whole | |
callback phase. We can't do this in the API because all the mobile app can give us | |
is the OAuth token. | |
Most of the code was lifted from Ueberauth, with minor changes as needed. |
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
import Foundation | |
/** | |
Determine whether Optional collection is nil or an empty collection | |
:param: collection Optional collection | |
:returns: true if collection is nil or if it is an empty collection, false otherwise | |
*/ | |
public func isNilOrEmpty<C: CollectionType>(collection: C?) -> C? { | |
switch collection { |
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
/* Gruntfile.js | |
* Grunt workflow for building AngularJS/Ionic applications. | |
* Assumption: | |
* - Gruntfile.js is placed under project root directory | |
* - there are 4 directories called "www", "coffee", "scss", and "haml" under the project's root directory | |
* - all the necessary npm packages included with grunt.loadNpmTasks() are installed already | |
* - %script{:src => '//localhost:35729/livereload.js'} in included at the bottom of your index.haml | |
*/ | |
'use strict'; |
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
# The following script will deploy a Laravel 5 applicaion on AWS Elastic Beanstalk. | |
# Add to .ebextensions at the root of your application and name your commands file (e.g., commands.config) | |
# -------------------------------- Commands ------------------------------------ | |
# Use "commands" key to execute commands on the EC2 instance. The commands are | |
# processed in alphabetical order by name, and they run before the application | |
# and web server are set up and the application version file is extracted. | |
# ------------------------------------------------------------------------------ | |
commands: | |
01updateComposer: |
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
import Foundation | |
/** | |
Determine whether Optional collection is nil or an empty collection | |
:param: collection Optional collection | |
:returns: true if collection is nil or if it is an empty collection, false otherwise | |
*/ | |
public func isNilOrEmpty<C: CollectionType>(collection: C?) -> Bool { | |
switch collection { |
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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
NewerOlder