Hey, glad you are here. Now let's get you settled into our Team. Before we look into our current products, we will try to familiarize some of the technologies that are used in production through some set of simple tasks. These tasks are meant to act as a stepping stone to learning the technologies mentioned below:
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
#!bin/bash | |
# add Macbunutu ppa and themes ppa | |
sudo apt-add-repository -y ppa:noobslab/macbuntu && sudo apt-add-repository -y ppa:noobslab/themes | |
sudo apt-get update | |
# icons | |
sudo apt-get -y install macbuntu-os-icons-lts-v7 | |
# cursors | |
sudo apt-get -y install macbuntu-os-ithemes-lts-v7 | |
# launcher | |
sudo apt-get -y install slingscold |
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
def validate_api_or_user(f): | |
@wraps(f) | |
def decorated(*args, **kwargs): | |
auth = request.authorization | |
print auth | |
if not auth: # no header set | |
if current_user.is_authenticated: # check active session | |
g.user = current_user | |
return f(*args, **kwargs) | |
else: |
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
FROM wordpress:php7.3-apache | |
WORKDIR /var/www/html | |
COPY ending-line/ wp-content/plugins/ending-line/ |
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
# ============================================================ | |
# Build your jekyll blog | |
# ============================================================ | |
FROM jekyll/jekyll:stable AS build | |
RUN mkdir /jekyll-minima | |
WORKDIR /jekyll-minima | |
# copy the blog source | |
COPY . . |
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 MyAppWeb.AgentChannel do | |
use Phoenix.Channel | |
alias MyApp.Presence | |
@doc """ | |
Used by backend agent | |
""" | |
def join("agent:" <> _agent_topic, _message, socket) do | |
send(self(), :after_agent_joined) | |
{:ok, socket} |
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
<p> | |
<%= link "Agent", to: agent_path(@conn, :show) %> | |
<%= if @is_agent_online do %> | |
(Online: <span class="has-text-success"><%= @is_agent_online %></span>) | |
<% else %> | |
(Online: <span class="has-text-danger"><%= @is_agent_online %></span>) | |
<% end %> | |
</p> |
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 MyAppWeb.AgentChannel do | |
use Phoenix.Channel | |
alias MyAppWeb.Endpoint | |
alias MyApp.AgentCommand | |
def push(topic, event, payload) do | |
Endpoint.broadcast("agent:#{topic}", event, payload) | |
end |