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 TrangellCmsService.Cms.Plugs.AdminChecker do | |
import Plug.Conn | |
import Phoenix.Controller | |
def init(_params) do | |
end | |
def call(%Plug.Conn{params: %{"acl" => acl}} = conn, params) do |
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 load_posts_by_category_alias(category_alias, group_acl) do | |
category = fetch_posts_by_category_alias(category_alias, group_acl) | |
|> Enum.find(& &1.seo_alias_link == "#{category_alias}") | |
post = category | |
|> Map.fetch!(:cms_post) | |
for %TrangellCmsService.Cms.Db.Post{} = p <- post do | |
%{ | |
title: p.title, |
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
1-yellow | |
blockquote { | |
border-right: 5px solid rgba(233, 223, 46, 0.44); | |
background-color: #fcf8e3; | |
} | |
2- red | |
blockquote { |
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 kab(conn, %{"token" => token}) do | |
case ApiTrangell.Guardian.decode_and_verify(token) do | |
{:ok,claims} -> | |
IO.puts claims | |
json conn, %Person{token: "verify"} | |
{:error, any} -> conn | |
|> put_status(403) | |
|> json %{ error: "unauthorized"} | |
end |
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
server { | |
listen 80; | |
server_name elixir.localhost; | |
location / { | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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
server { | |
listen 80; | |
server_name email.localhost; | |
error_log /var/log/nginx/localhost.error_log info; | |
root /var/www/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
127.0.0.1 localhost | |
127.0.0.1 email.localhost | |
127.0.0.1 elixir.localhost | |
# Adobe Blocker | |
127.0.0.1 lmlicenses.wip4.adobe.com | |
127.0.0.1 lm.licenses.adobe.com | |
127.0.0.1 na1r.services.adobe.com | |
127.0.0.1 hlrcv.stage.adobe.com |
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
آدرس آی پی DNS سرور های عمومی عبارتند از: | |
Google گوگل | |
8.8.8.8 | |
8.8.4.4 | |
Level 3 Communications (Broomfield, CO, US) | |
4.2.2.1 | |
4.2.2.2 | |
4.2.2.3 |
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
import React, { Component } from 'react'; | |
import './App.css'; | |
import Person from './Person/Person'; | |
class App extends Component { | |
constructor(props) { | |
super(props); | |
this.nTestChange = this.nTestChange.bind(this); | |
this.togglePersonsHandler = this.togglePersonsHandler.bind(this); | |
} |
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 Tasksups.Application do | |
# See https://hexdocs.pm/elixir/Application.html | |
# for more information on OTP Applications | |
@moduledoc false | |
use Application | |
# use Supervisor | |
def start(_type, _args) do | |
import Supervisor.Spec, warn: false |