Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / configurar-node-ts.md
Last active May 11, 2024 20:36
Node con TypeScript - TS-Node-dev simplificado

Node con TypeScript - TS-Node-dev (preferido)

  1. Instalar TypeScript y demás dependencias
npm i -D typescript @types/node ts-node-dev rimraf
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
npx tsc --init --outDir dist/ --rootDir src
@taotao54321
taotao54321 / nesgenie.py
Created December 27, 2016 19:19
NES Game Genie encoder/decoder
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""NES Game Genie encoder/decoder.
Usage:
nesgenie enc <addr> <value> [cmp]
nesgenie dec <code>
"""
@mokoshalb
mokoshalb / Office_kms
Created July 4, 2019 05:36 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
cd\Program Files\Microsoft Office\Office16
cd\Program Files (x86)\Microsoft Office\Office16
cscript OSPP.VBS /sethst:kms.digiboy.ir
cscript OSPP.VBS /actcscript OSPP.VBS /dstatus
slmgr.vbs /ckms
@agsemenov
agsemenov / uaquotes.json
Created May 11, 2024 19:29
Quotes List in JSON Format UA
{
"quotes": [
{
"quote": "Мені важко говорити про те, що важливо для мене. Мене можна побачити тільки в діях.",
"author": "Леся Українка"
},
{
"quote": "Найголовнішим є не відчуття щастя, а наше прагнення до щастя.",
"author": "Тарас Шевченко"
},
@lyshie
lyshie / config-deb-i386.json
Last active May 11, 2024 20:34
Scratch Desktop (Scratch 3.0 Offline Editor) on GNU/Linux
{
"src": "/tmp/scratch-desktop/",
"dest": "/tmp/",
"arch": "i386",
"icon": "/tmp/scratch-desktop/resources/Icon.png",
"categories": [
"Education"
]
}
@jean-leonco
jean-leonco / _index.tsx
Last active May 11, 2024 20:32
Remix Simple Authentication
import { redirect, type LoaderFunctionArgs } from '@remix-run/node'
import { Form, useLoaderData } from '@remix-run/react'
import { sessionCookie } from '../session.server'
export async function loader({ request }: LoaderFunctionArgs) {
const cookieHeader = request.headers.get('Cookie')
const cookie = await sessionCookie.parse(cookieHeader)
if (!cookie) {
return redirect('/login')
}
@Heidi-Negrete
Heidi-Negrete / deploy.yml
Created November 2, 2023 17:09
Github Workflow configuration to deploy a Godot 4 game to Github Pages
name: "Publish to GitHub Pages"
env:
GODOT_VERSION: 4.1.2
on:
workflow_dispatch:
push:
branches:
- main
@tranquan
tranquan / xcode-keybindings-as-vscode.md
Last active May 11, 2024 20:30
Xcode KeyBindings as VSCode
@beauwilliams
beauwilliams / Vagrant-M1-Install.bash
Last active May 11, 2024 20:20
Run x86 VM's on Mac M1 arm using vagrant with qemu hypervisor
brew install vagrant qemu
#Due to dependency errors, we must install vbguest first..
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-qemu
#cd to working dir you like to keep your vagrant files
cd ~/VM-and-containers/VagrantMachines/M1-vagrantfiles/ubuntu18-generic-64/
#Create a vagrant file
$EDITOR Vagrantfile
@karpathy
karpathy / min-char-rnn.py
Last active May 11, 2024 20:19
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)