Skip to content

Instantly share code, notes, and snippets.

View ahmadshah's full-sized avatar
:octocat:
Yo!

Ahmad Shah Hafizan Hamidin ahmadshah

:octocat:
Yo!
View GitHub Profile
@ahmadshah
ahmadshah / github-stats.md
Created March 29, 2022 14:20
Github Stats

Ahmad Shah Github Stats

@ahmadshah
ahmadshah / keybase.md
Created October 22, 2019 15:39
keybase.md

Keybase proof

I hereby claim:

  • I am ahmadshah on github.
  • I am ahmadshahhafizan (https://keybase.io/ahmadshahhafizan) on keybase.
  • I have a public key whose fingerprint is D4EC 26F2 4E6C 3E8E 6AD2 A17E 5CFA 083D 429A F81F

To claim this, I am signing this object:

<?php
namespace App\Http\Controllers;
use App\User as UserModel;
class UserController extends Controller
{
public function index()
{
@ahmadshah
ahmadshah / JWT.go
Last active May 31, 2018 15:39
Golang JWT
package auth
import (
"errors"
"time"
jwt "github.com/dgrijalva/jwt-go"
"github.com/jinzhu/gorm"
)
@ahmadshah
ahmadshah / tasks.md
Last active April 1, 2018 07:05
APU Chatbot Workshop

Tasks

  • Make sure you have code editor installed.
  • Make sure Nodejs and NPM is installed and running correctly.
  • Create a new Telegram account and download the desktop/mobile app.
  • Create a new Telegrame bot and grab the access token.
  • Create a new DialogFlow account. https://dialogflow.com
  • Create a new SmallTalk agent and grab the access token.
  • Create a new Firebase account. https://firebase.google.com
  • Create a new Firestore database and a new collection.
@ahmadshah
ahmadshah / Dockerfile
Last active October 10, 2017 18:06
Darknet, OpenCV and Python3 Docker
FROM loretoparisi/darknet:latest
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y build-essential \
libssl-dev \
libffi-dev \
python3-dev \
python3-pip \
libopencv-dev \
defmodule Fashionista.Event.UserIsAuthenticated do
use Fashionista.Service.Kong
import Joken
@response_fields ~w(
username custom_id message secret id algorithm created_at key consumer_id
)
def create_token(email, id) do
@ahmadshah
ahmadshah / docker-compose.yml
Created September 23, 2017 19:24
Restcomm docker compose
version: "2"
services:
restcomm:
image: restcomm/restcomm:latest
container_name: "restcomm"
environment:
- RCBCONF_STATIC_ADDRESS=127.0.0.1
- ENVCONFURL=https://raw.githubusercontent.com/RestComm/Restcomm-Docker/master/env_files/restcomm_env_locally.sh
ports:
- "8080:8080"
@ahmadshah
ahmadshah / docker-compose.yml
Created October 27, 2016 18:42
elixir docker
version: '2'
services:
db:
image: mariadb
restart: always
volumes:
- ./docker/data/mysql:/var/lib/mysql
ports:
- "3306:3306"
defmodule Reactor.Service.Authenticator do
@behaviour Reactor.Contract.Service.Authenticator
@moduledoc """
User authentication service.
"""
use Reactor.Resolver, repositories: [:user]
alias Comeonin.Bcrypt, as: Comeonin
alias Reactor.Entity.User, as: UserEntity