Skip to content

Instantly share code, notes, and snippets.

Avatar
👋

Anish Dcruz anishdcruz

👋
View GitHub Profile
@anishdcruz
anishdcruz / :id.ts
Last active Nov 20, 2021
Adonisjs file based routing
View :id.ts
// create file api/posts/:id.ts
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
export const POST = async({params}: HttpContextContract) => `Viewing post with id ${params.id}`
export const PUT = async({params}: HttpContextContract) => `Viewing put with id ${params.id}`
export const GET = async({params}: HttpContextContract) => `Viewing put with id ${params.id}`
@anishdcruz
anishdcruz / AppServiceProvider.php
Last active Apr 7, 2018
Replacement for Apex app/Providers/AppServiceProvider.php
View AppServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Support\CustomValidators;
class AppServiceProvider extends ServiceProvider
{
View ubuntu-16.04-with-laravel-demo
# before install create user deployer
# adduser deployer
# usermod -aG sudo deployer
#
export DEBIAN_FRONTEND=noninteractive
# Update Package List
apt-get update
View dsahboard.vue
<template>
{{sharedState.gallery}}
</template>
<script>
import Gallery from '../../js/helpers/gallery.js'
export default {
data() {
return {
sharedState: Gallery.state // is important
}
@anishdcruz
anishdcruz / Common-Currency.json
Created May 16, 2017 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
View Common-Currency.json
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},