Skip to content

Instantly share code, notes, and snippets.

@toy-crane
toy-crane / toss-frontend-rules.mdc
Last active December 8, 2025 07:53
토스 프론트엔드 가이드라인 기반으로 만든 Cursor rule
# Frontend Design Guideline
This document summarizes key frontend design principles and rules, showcasing
recommended patterns. Follow these guidelines when writing frontend code.
# Readability
Improving the clarity and ease of understanding code.
def generate(
model,
tokenizer,
prompt,
entry_count=10,
entry_length=30, #maximum number of words
top_p=0.8,
temperature=1.,
):
model.eval()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GwonHyeok
GwonHyeok / login.js
Last active December 17, 2023 15:45
네이버 로그인 Node.js
const rp = require('request-promise')
const NodeRsa = require('node-rsa')
const getLenChar = value => String.fromCharCode(`${value}`.length)
async function doLogin(email, password) {
const cookieJar = rp.jar();
// 세션 키 발급
const keys = await rp({url: 'https://nid.naver.com/login/ext/keys.nhn', jar: cookieJar})
@cstrap
cstrap / django-model-log-history.py
Created March 25, 2015 13:34
Django model log history. A sample that uses LogEntry (django default) and reversion.
from django.contrib.admin.models import LogEntry, CHANGE, ContentType
from reversion.revisions import default_revision_manager as revision_manager
from app.models import MyModel
revision_manager.register(MyModel)
LogUser, created = User.objects.get_or_create(username='LogUser')
if created:
ApplicationUser.first_name = 'Log'