Skip to content

Instantly share code, notes, and snippets.

@omayib
omayib / SimpleRepositoryPatternIn.swift
Created August 29, 2017 07:53
Introducing repository pattern with swift.
//: Playground - noun: a place where people can play
import UIKit
class Todo{
var tempId: UUID?
var id : Int
var title: String
var isCompleted: Bool
@danielgross
danielgross / mathpix2gpt.py
Last active May 11, 2024 20:48
mathpix2gpt.py
import requests
import time
import os
import sys
import openai
import tiktoken
from termcolor import colored
openai.api_key = open(os.path.expanduser('~/.openai')).read().strip()
@YoSoyPhil
YoSoyPhil / README.md
Last active May 11, 2024 20:48
Install Canon EOS Utility 2 full version

How to install Canon EOS Utility 2 full version

EOS Utility 2.14.20a full version install

Go to Canon and select your camera model under software downloads. At the time this guide was written, the link was https://www.canon-europe.com/support/consumer_products/software/eos-utility.html

Select your camera and download "EOS Utility 2.14.20a Updater for Windows" (yes, we will do full install with this file).

Before we can run the installer we need to add a key to our registry.

@alexweberk
alexweberk / mlx_finetuning_gemma.ipynb
Last active May 11, 2024 20:40
MLX Fine-tuning Google Gemma
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tkrisztian95
tkrisztian95 / default.conf
Last active May 11, 2024 20:40
Nginx server JSON file as an API response
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www;
location /api/endpoint {
default_type application/json;
index apiResponse.json;
alias /var/www/;
}
// Pure addToCart() returns a new cart
// It does not mutate the original.
const addToCart = (cart, item, quantity) => {
const newCart = lodash.cloneDeep(cart);
newCart.items.push({
item,
quantity
});
return newCart;

Edit 2024-02-05:

The instructions below are outdated.

There is an official PR (#2027) for mouse functionality. You should use that rather than what is described below.

See comments [1, 2] below.

ZMK mouse support

@denji
denji / windows-keyboard-default-mode.md
Created September 29, 2020 00:21
Keyboard flags and indicators when start Windows 10

HKEY_USERS\.DEFAULT\Control Panel\Keyboard and edit the string value InitialKeyboardIndicators to one of the following values:

InitialKeyboardIndicators bitmask list:

  • 0 — turns off Scroll Lock, Num Lock, Caps Lock (default)
  • 1 — turn on Caps Lock
  • 2 — turn on Num Lock
  • 3 — turn on both Num Lock and Caps Lock
  • 4 — turn on Scroll Lock
  • 5 — turn on both Scroll Lock and Caps Lock
  • 6 — turn on both Scroll Lock and Num Lock
@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>
"""