Skip to content

Instantly share code, notes, and snippets.

View stellasoe's full-sized avatar

stella soe stellasoe

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 {
@eimg
eimg / ES6-overview.md
Last active September 9, 2025 09:14
Overview of some ES6 features

ES6 - Modern JavaScript

ခြောက်ကြိမ်မြောက် တည်းဖြတ်မှုဖြစ်သည့်အတွက် ES6 ဟု အတိုကောက်ခေါ်၍ 2015 ခုနှစ်တွင် ဖန်တီးခဲ့သည့် အတွက် ECMAScript2015 ဟု ရံဖန်ရံခါ ခေါ်သည့် နည်းပညာသည် လက်ရှိ JavaScript (ES5) ကို အဆင့်မြှင့်တင်ထားသည့် နည်းပညာဖြစ်သည်။ ES6 တွင် ပါဝင်လာသည့် လုပ်ဆောင်ချက်များမှ အချို့ကို ရွေးထုတ် ဖော်ပြလိုက်ပါသည်။

Block-scope Variable

မူလ JavaScript တွင် var Keyword ကို အသုံးပြု၍ Variable များ ကြေငြာနိုင်သည်။ ထို Variable များသည် Function-scope သဘောသဘာဝ ရှိကြသည်။ ES6 တွင် let Keyword ကို အသုံးပြု၍ Block-scope Variable များ ကြေငြာအသုံးပြုနိုင်သည်။

let i = 10
@raisiqueira
raisiqueira / fileUpload.vue
Created December 22, 2017 13:06
Simple file upload with Vue and Axios
<style>
input[type="file"]{
position: absolute;
top: -500px;
}
div.file-listing{
width: 200px;
}
@kerryboyko
kerryboyko / README.md
Last active April 26, 2023 16:08
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.

@chranderson
chranderson / nvmCommands.js
Last active April 30, 2026 16:40
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node

Realtime Notifications with ActionCable

In this episode we're going to be adding realtime notifications into your app using ActionCable. We've talked about notifications a few times in the past and we used AJAX polling for that. 95% of the time, polling is the solution that would be recommended for it.

But if you're looking for a good introduction into ActionCable then this is a decent one because we're only really using it for one way from the server side to the client side.

Getting started

So to get started we're starting with an app that has Bootstrap installed and then we created a Main controller with an index view which is where we will list our Notifications as for this example.

Before we generate our channels let's install a few things

@gbuesing
gbuesing / ml-ruby.md
Last active December 10, 2025 03:21
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

@tsabat
tsabat / zsh.md
Last active March 10, 2026 08:50
Getting oh-my-zsh to work in Ubuntu