Skip to content

Instantly share code, notes, and snippets.

View hareom284's full-sized avatar
🔍
I do what I love.

Hare Om hareom284

🔍
I do what I love.
  • @leaptech.sg
  • Thailand
  • 15:04 (UTC +07:00)
  • X @hareom284
View GitHub Profile
@saturngod
saturngod / index.tsx
Created December 24, 2025 04:22
tanstack stack example
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { createFileRoute, useRouter } from '@tanstack/react-router'
import { createServerFn } from '@tanstack/react-start'
import { z } from 'zod'
// --- 1. FAKE DATABASE (Global Array) ---
// Server မရပ်မချင်း ဒီ variable က memory ထဲမှာ ကျန်နေပါလိမ့်မယ်။
// Real world မှာတော့ ဒါဟာ Database Table တစ်ခု ဖြစ်ပါလိမ့်မယ်။
declare global {
@hareom284
hareom284 / 7.1.py
Created July 22, 2020 14:57
Write a program that prompts for a file name, then opens that file and reads through the file, and print the contents of the file in upper case. Use the file words.txt to produce the output below.
fname = input("Enter file name: ")
try :
fh = open(fname)
except:
print(fname," files does not exit .Enter valid file names")
quit()
for line in fh :
line =line.rstrip()# for removing newline from the letter
print(line.upper())
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active December 5, 2025 06:44
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@tomnomnom
tomnomnom / alert.js
Last active December 24, 2025 18:39
Ways to alert(document.domain)
// How many ways can you alert(document.domain)?
// Comment with more ways and I'll add them :)
// I already know about the JSFuck way, but it's too long to add (:
// Direct invocation
alert(document.domain);
(alert)(document.domain);
al\u0065rt(document.domain);
al\u{65}rt(document.domain);
window['alert'](document.domain);
@cobyism
cobyism / gh-pages-deploy.md
Last active December 7, 2025 08:10
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).