Skip to content

Instantly share code, notes, and snippets.

View achyutdev's full-sized avatar
🏠
Working from home

Achyut Devkota achyutdev

🏠
Working from home
View GitHub Profile
@achyutdev
achyutdev / webadaptorService.yml
Created March 29, 2020 18:42
Web Adaptor Service
openapi: 3.0.0
servers:
- url: 'https://pudo.com.np/web/'
info:
title: Web Adaptor Service
description: >-
Provides endpoints to integrate PUDO in web page
version: '1.0'
paths:
'/locations':
@achyutdev
achyutdev / Enum.md
Created February 24, 2018 19:06
Implementation of Enum

##Enum implementation ###Implementation 1

enum Day
{
    SUNDAY, MONDAY, TUESDAY, WEDNESDAY,
    THURSDAY, FRIDAY, SATURDAY;
}

###Implementation 1

import java.io.File;
public class CleanWASTrash {
private static String ROOT_PATH = "C:\\Users\\devkoa1\\Desktop\\test";
public static void main(String... strings) {
try {
System.out.println("-----------------------------Clean WAS started -------------------------------------");
// deleteDirectory(new File(ROOT_PATH + "\\config\\temp\\"));
@achyutdev
achyutdev / CGProject.pov
Last active February 18, 2017 19:46
CGProject
#include "colors.inc"
#include "stones.inc"
#include "textures.inc"
#include "shapes.inc"
#include "glass.inc"
#include "metals.inc"
#include "woods.inc"
global_settings { ambient_light White }
global_settings{max_trace_level 10}
package application;
import java.io.File;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import domain.Address;
public enum Error {
DATABASE(0, "A database error has occured."),
DUPLICATE_USER(1, "This user already exists.");
private final int code;
private final String description;
private Error(int code, String description) {
this.code = code;
this.description = description;
@Around("execution(* cs544.spring.bank.service.*.*(..))")
public Object invoke(ProceedingJoinPoint call ) throws Throwable {
StopWatch sw = new StopWatch();
sw.start(call.getSignature().getName());
Object retVal = call.proceed();
sw.stop();
long totaltime = sw.getLastTaskTimeMillis();
System.out.println("Time taken :" +totaltime);
return retVal;
}
@achyutdev
achyutdev / gist:dd5c16dfa11bf2695f7d
Last active August 29, 2015 14:23
cdr sql syntax
CREATE TABLE `cdr` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`calldate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`clid` VARCHAR(80) NOT NULL DEFAULT '',
`src` VARCHAR(80) NOT NULL DEFAULT '',
`dst` VARCHAR(80) NOT NULL DEFAULT '',
`dcontext` VARCHAR(80) NOT NULL DEFAULT '',
`lastapp` VARCHAR(200) NOT NULL DEFAULT '',
`lastdata` VARCHAR(200) NOT NULL DEFAULT '',
`duration` FLOAT UNSIGNED NULL DEFAULT NULL,
[general]
static=yes
writeprotect=No
autofallthrough=No
clearglobalvars=No
priorityjumping=No
;------------------------------------------------------
[Default]
include=>python