Skip to content

Instantly share code, notes, and snippets.

View shahryarjb's full-sized avatar
👐
I am ready for a new job offer and relocation

Shahryar Tavakkoli shahryarjb

👐
I am ready for a new job offer and relocation
View GitHub Profile
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
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,
1-yellow
blockquote {
border-right: 5px solid rgba(233, 223, 46, 0.44);
background-color: #fcf8e3;
}
2- red
blockquote {
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
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;
server {
listen 80;
server_name email.localhost;
error_log /var/log/nginx/localhost.error_log info;
root /var/www/html;
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
آدرس آی پی 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
@shahryarjb
shahryarjb / app.js
Last active December 23, 2017 19:00
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);
}
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