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
#start odoo container for the first time | |
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo --name db postgres:9.4 | |
docker run -p 8069:8069 -it --name odoo --link db:db -t odoo | |
#bash into odoo as root | |
docker exec -i -t -u 0 odoo /bin/bash | |
#download module and extract it at local file system | |
#copy module to odoo modules directory |
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
docker run -p 4011:4011 -p 4033:4033 -v /Users/samir/Documents/projects/elixir:/usr/src -it elixir:1.5.2 bash |
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
Show hidden characters
{ | |
"presets": [ | |
"react", | |
"es2015", | |
"stage-1" | |
], | |
"plugins": ["transform-decorators-legacy", "transform-class-properties", "inline-import-graphql-ast"] | |
} |
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
#to let eb use python3 | |
export PATH=/Users/Apple/Library/Python/3.4/bin:$PATH |
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
insert_result = result | |
|> FieldsFitter.fit_driver_fields | |
|> (&Schools.Driver.changeset(%Schools.Driver{}, &1)).() | |
|> repo.insert |
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
for result_error <- changeset.errors do | |
{field_name, ecto_error}= result_error | |
{error_message, ecto_validation}= ecto_error | |
[ecto_validation_message| ecto_validation_tail] = ecto_validation | |
ecto_validation_message= Kernel.inspect ecto_validation_message | |
Poison.encode! %{error: "invalid field value", field: %{field_name: field_name, error_message: ecto_validation_message }}) | |
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
Enum.map(Enum.to_list(0..Enum.count(Map.keys(row))), fn index -> row["#{index}"] end) | |
example row: | |
row %{"0" => "2", "1" => "أحمد عمر فؤاد خالد عبدالله 2", | |
"10" => "null", "11" => "null", "12" => "null", "13" => "null", | |
"14" => "null", "2" => "Male", "3" => "الأول الأساسي", "4" => "A", | |
"5" => "Amman", "6" => "null", "7" => "null", "8" => "null", "9" => "null"} |
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
<?xml version="1.0"?> | |
<!DOCTYPE tsung SYSTEM "/Users/samir/Documents/projects/tsung/tsung-1.0.dtd"> | |
<tsung loglevel="error" version="1.0"> | |
<clients> | |
<client host="localhost" use_controller_vm="true" maxusers="10000"/> | |
</clients> | |
<servers> | |
<server host="192.168.1.22" port="9907" type="tcp"/> | |
</servers> |
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
// Brunch automatically concatenates all files in your | |
// watched paths. Those paths can be configured at | |
// config.paths.watched in "brunch-config.js". | |
// | |
// However, those files will only be executed if | |
// explicitly imported. The only exception are files | |
// in vendor, which are never wrapped in imports and | |
// therefore are always executed. | |
// Import dependencies |
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 node:latest | |
MAINTAINER Samir Sabri | |
# System update | |
RUN apt-get -q -y update | |
RUN apt-get -q -y install npm | |
RUN npm install -g gulp-cli | |
RUN npm install -g grunt-cli |