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 Randomizer do | |
@moduledoc """ | |
Random string generator module. | |
""" | |
@doc """ | |
Generate random string based on the given legth. It is also possible to generate certain type of randomise string using the options below: | |
* :all - generate alphanumeric random string | |
* :alpha - generate nom-numeric random string |
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
<template> | |
<button @click="emitEvent">EVENT</button> | |
</template> | |
<script> | |
import { EV } from './events' | |
export default { | |
methods: { | |
emitEvent() { |
The goal is to support soft delete functionality in Ecto.Repo
. With the suggestion by @imranismail, another repo is created and the remaining functionalities are delegate to the original MyApp.Repo
.
The new repo get/2
and all/1
functions will exclude the soft deleted record by default. delete/1
and delete_all/1
will update the delete_at
column by default instead of deleting.
MyApp.Repo.get(MyApp.User, 1) //will return nil if record is in soft delete state
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:
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
<?php | |
namespace App\Http\Controllers; | |
use App\User as UserModel; | |
class UserController extends Controller | |
{ | |
public function index() | |
{ |
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
package auth | |
import ( | |
"errors" | |
"time" | |
jwt "github.com/dgrijalva/jwt-go" | |
"github.com/jinzhu/gorm" | |
) |
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.
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 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 \ |
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 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 |
NewerOlder