Skip to content

Instantly share code, notes, and snippets.

View MinSomai's full-sized avatar
🇳🇵
from the land of Mountains, Nepal. Namaste!

Min Somai MinSomai

🇳🇵
from the land of Mountains, Nepal. Namaste!
View GitHub Profile
@MinSomai
MinSomai / App.vue
Created March 24, 2022 07:20
Vue show viewport height and width in title for debugging with vueuse
<script>
import { ref, computed, onMounted } from "@vue/composition-api";
import { useWindowSize, useTitle } from "@vueuse/core";
export default {
setup() {
const { width, height } = useWindowSize();
const title = computed(() => {
return `w: ${width.value} h: ${height.value}`;
});
@MinSomai
MinSomai / index.md
Created February 9, 2022 07:33 — forked from lcherone/index.md
Template variable replacement, js and php

In PHP

<?php
$vars = [
  'name' => 'Loz'
];

$template = 'Hello {{ name }}!';
@MinSomai
MinSomai / App.vue
Created December 28, 2021 07:02
Vuetify - make components global
<template>
<v-app>
<!-- other components ... -->
<confirm ref="confirm"></confirm>
</v-app>
</template>
<script>
import confirm from "./components/confirm.vue";
export default{
{
"todays-price": [
{
"id": 1366730,
"businessDate": "2021-11-25",
"securityId": 2790,
"symbol": "ACLBSL",
"securityName": "Aarambha Chautari Laghubitta Bittiya Sanstha Limited",
"openPrice": 1453,
"highPrice": 1453,
@MinSomai
MinSomai / .vimrc
Created November 15, 2021 10:50
Firacode Icons for nerdtree-git-plugin
" using windows character map
" Nerdtree git plugin
let g:NERDTreeGitStatusIndicatorMapCustom = {
\ 'Modified' :'☼',
\ 'Staged' :'+',
\ 'Untracked' :'U',
\ 'Renamed' :'➡',
\ 'Unmerged' :'‗',
\ 'Deleted' :'X',
\ 'Dirty' :'╳',
@MinSomai
MinSomai / Problem Solving : Golang | Left Rotation - Hackerrank.go
Last active June 22, 2021 17:07
Problem Solving : Golang | Left Rotation - Hackerrank.go
package main
import (
"bufio"
"fmt"
"io"
"os"
"strconv"
"strings"
)
@MinSomai
MinSomai / Java | Pattern Syntax Checker - Hackerrank.java
Created May 10, 2021 15:11
Java | Pattern Syntax Checker - Hackerrank.java
import java.util.Scanner;
import java.util.regex.*;
public class Solution
{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int testCases = Integer.parseInt(in.nextLine());
while(testCases>0){
String pattern = in.nextLine();
@MinSomai
MinSomai / Java | Java Anagrams - Hackerrank.java
Created May 8, 2021 14:01
Java | Java Anagrams - Hackerrank.java
import java.util.Scanner;
public class Solution {
static boolean isAnagram(String a, String b) {
if(a.length() != b.length()){
return false;
}
a = a.toLowerCase();
@MinSomai
MinSomai / print 3rd character of line.bash
Last active May 1, 2021 16:50
Bash read N lines and print 3rd Character of that line.
while read -r input; do
printf '%s\n' "$input" | cut -c3
done
@MinSomai
MinSomai / Day 29 : Golang | Bitwise AND - Hackerrank.go
Last active March 23, 2021 16:57
Day 29 : Golang | Bitwise AND - Hackerrank.go
package main
import (
"bufio"
"fmt"
"io"
"os"
"strconv"
"strings"
)