Skip to content

Instantly share code, notes, and snippets.

View lakshyabatman's full-sized avatar
:shipit:
Learning step by step

Lakshya Khera lakshyabatman

:shipit:
Learning step by step
View GitHub Profile
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
@lakshyabatman
lakshyabatman / index.py
Last active March 29, 2020 21:03
prime-sum
import math
def primesum(A):
if A == 4:
return [2,2]
odds = []
# We need to build odd prime numbers from 3 to A-1
for i in range(3,A,2):
odds.append(i)
m = math.ceil(math.sqrt(A))
@lakshyabatman
lakshyabatman / Lapindrome.cpp
Last active April 14, 2020 18:02
DOUBT, need help!
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
string Lapindrome(string input) {
int size = input.length();
int half = size/2;
string secondHalf, firstHalf;
if(size%2==0) {
@lakshyabatman
lakshyabatman / Test-final.vue
Last active April 22, 2020 03:13
Test component using Vue + Typescript
<template>
<div>
<p>Hi this is test template</p>
<p>{myComputedFunction}</p>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import { Component, Prop ,Emit } from 'vue-property-decorator';
@lakshyabatman
lakshyabatman / Test-new.vue
Last active April 22, 2020 02:37
Basic test component using Vue and typescript
<template>
<div>
<p>Hi this is test template</p>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import { Component} from 'vue-property-decorator';
@Component({
@lakshyabatman
lakshyabatman / Test-with-props.vue
Created April 22, 2020 02:40
Test component with props
<template>
<div>
<p>Hi this is test template</p>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import { Component, Prop} from 'vue-property-decorator';
@Component({
@lakshyabatman
lakshyabatman / Test-with-child-components.vue
Last active April 22, 2020 03:12
Test component with child components
<template>
<div>
<p>Hi this is test template</p>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import { Component, Prop} from 'vue-property-decorator';
import AnotherComponent from './another-component.vue'
@lakshyabatman
lakshyabatman / Test-with-computed.vue
Last active April 22, 2020 03:12
Test component with computed function
<template>
<div>
<p>Hi this is test template</p>
<p>{myComputedFunction}</p>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import { Component, Prop} from 'vue-property-decorator';
@lakshyabatman
lakshyabatman / Test-with-mounted.vue
Last active April 22, 2020 03:11
Test component with a lifecycle method
<template>
<div>
<p>Hi this is test template</p>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import { Component, Prop} from 'vue-property-decorator';
@lakshyabatman
lakshyabatman / store.ts
Last active May 10, 2020 20:44
Vue basic store
const moduleA = {
state: { ... },
mutations: { ... },
actions: { ... },
getters: { ... }
}
const moduleB = {
state: { ... },
mutations: { ... },