Skip to content

Instantly share code, notes, and snippets.

View puncoz's full-sized avatar
🇳🇵
Working from home

Puncoz Nepal puncoz

🇳🇵
Working from home
View GitHub Profile
@puncoz
puncoz / CLAUDE.md
Created December 12, 2025 17:19 — forked from Web-Dev-Codi/CLAUDE.md
My Current global CLAUDE.md

Working with Q — Coding Agent Protocol

What This Is

Applied rationality for a coding agent. Defensive epistemology: minimize false beliefs, catch errors early, avoid compounding mistakes.

This is correct for code, where:

  • Reality has hard edges (the compiler doesn't care about your intent)
  • Mistakes compound (a wrong assumption propagates through everything built on it)
  • The cost of being wrong exceeds the cost of being slow
@puncoz
puncoz / useApi.js
Last active June 30, 2022 05:16
useApi.js
"use strict"
import Http from "axios"
import _get from "lodash/get"
import qs from "qs"
import { inject } from "vue"
import useCache from "./useCache"
import useNotification from "./useNotification"
export default () => {
const cache = useCache()
@puncoz
puncoz / NepaliDatePicker.vue
Created June 20, 2022 08:16
Nepali Date Picker for Vue.js
<template>
<input :id="id"
type="text"
:value="date"
class="form-control date-picker-bs"
:placeholder="placeholder">
</template>
<script type="text/ecmascript-6">
import { mapGetters } from "vuex"
@puncoz
puncoz / PDFEditor.vue
Created May 7, 2022 11:43
Blur PDF using canvas rectangle.
<template>
<div class="wrapper">
<canvas id="pdf-doc" ref="canvasRef"/>
</div>
</template>
<script type="text/ecmascript-6">
import * as pdfJsLib from "pdfjs-dist/build/pdf"
import pdfJsWorker from "pdfjs-dist/build/pdf.worker.entry"
  1. Open Automator.app
  2. Create new Quick Action
  3. Select Run AppleScript
  4. Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 100
	display notification "Volume set to 100" with title "✅ Microphone is on"
<template>
<modal :show="show"
modal-class="flex justify-center items-center"
max-width="sm"
:closeable="closeable"
@close="$emit('cancelled')">
<div class="px-6 py-4">
<div class="text-lg">
<slot name="title"/>
</div>
@puncoz
puncoz / NotificationItem.vue
Created October 14, 2021 11:15
Notification in vue3
<template>
<div class="flex items-center rounded p-3 shadow-md mb-2 w-64"
:class="{
'bg-green-500' : notification.type === 'success',
'bg-red-500' : notification.type === 'error',
'bg-yellow-500' : notification.type === 'warning',
'bg-blue-500' : notification.type === 'info',
'bg-primary-500' : notification.type === 'message',
}">
<div class="flex-1 flex items-center">
@puncoz
puncoz / Notification.php
Created August 31, 2020 08:51
FCM Notification
<?php
namespace App\Notification;
use App\Exceptions\FcmKeyNotSetException;
use GuzzleHttp\Client;
/**
* Class Notification
* @package App\Notification
@puncoz
puncoz / docker-commands.md
Last active March 10, 2020 10:15
Useful Docker Commands

Useful Docker Commands

Show docker disk usage

docker system df

# With verbose
docker system df -v

Basic NVM Commands

Repo:

https://github.com/nvm-sh/nvm

To download, compile, and install the latest release of node, do this:

nvm install node # "node" is an alias for the latest version