Skip to content

Instantly share code, notes, and snippets.

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

Kasun Vithanage kasvith

🏠
Working from home
View GitHub Profile
<template>
<v-app>
<component v-bind:is="layout"></component>
</v-app>
</template>
<script>
import AppLayout from './layouts/AppLayout'
import SimpleLayout from './layouts/SimpleLayout'
<template>
<v-container fluid fill-height>
<v-layout align-center justify-center>
<v-btn color="primary" @click="setLayout('simple-layout')">Simple Layout</v-btn>
<v-btn color="secondary" @click="setLayout('app-layout')">App Layout</v-btn>
</v-layout>
</v-container>
</template>
<script>
import Vue from 'vue'
import Router from 'vue-router'
import MyComponent from '@/components/MyComponent'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
import Vue from 'vue'
import App from './App'
import router from './router'
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.min.css'
import { store } from './store'
Vue.use(Vuetify)
Vue.config.productionTip = false
@kasvith
kasvith / nginxproxy.md
Created April 4, 2018 03:26 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@kasvith
kasvith / PancakeSorting.java
Created May 17, 2018 02:06
PancakeSorting
import java.util.Random;
public class PancakeSorting {
int [] pancakes = new int[1];
Random random;
int n;
public PancakeSorting(int n) {
random = new Random();
this.n = n;
@kasvith
kasvith / clangdump.s
Created July 15, 2018 07:04
Assembly dump from clang
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 13
.globl _main ## -- Begin function main
.p2align 4, 0x90
_main: ## @main
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi0:
.cfi_def_cfa_offset 16
@kasvith
kasvith / g++dump.s
Created July 15, 2018 07:06
Assembly dump for g++
.file "main.cpp"
.local _ZStL8__ioinit
.comm _ZStL8__ioinit,1,1
.text
.globl main
.type main, @function
main:
.LFB1021:
.cfi_startproc
pushq %rbp
@kasvith
kasvith / clang.asm
Last active July 15, 2018 08:10
Assembly dump for different compilers
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 13
.globl _main ## -- Begin function main
.p2align 4, 0x90
_main: ## @main
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi0:
.cfi_def_cfa_offset 16
@kasvith
kasvith / hello.py
Created July 16, 2018 10:47
Hello World python program for tutorial
# Returns hello world from method
def helloWorld():
return 'hello world'
if __name__ == '__main__':
# print it when running
print(helloWorld())