Skip to content

Instantly share code, notes, and snippets.

View sh-cho's full-sized avatar
💬
I may be slow to respond.

Seonghyeon Cho sh-cho

💬
I may be slow to respond.
View GitHub Profile
@rojas-diego
rojas-diego / document.rs
Created December 8, 2023 04:06
Under-Tested Implementation of Applying LSP Content Changes to Ropey and Tree Sitter
use ropey::{Rope, RopeSlice};
use serde::{Deserialize, Serialize};
use std::fmt;
use thiserror::Error;
use tower_lsp::lsp_types::{Position, TextDocumentContentChangeEvent};
use tree_sitter::{InputEdit, Parser, Point, Tree};
pub struct TextDocument {
pub rope: Rope,
pub tree: Option<Tree>,
@xmlking
xmlking / curl-with-http3-macos.md
Created December 4, 2021 20:09
Installing curl with http3 on MacOS

Work-in-pogress

Ref: cloudflare/homebrew-cloudflare#21

 # Clean up any old version of curl you may have already tried to install
brew remove -f curl

# Download the curl ruby install script provided by cloudflare
@troyfontaine
troyfontaine / 1-setup.md
Last active September 17, 2024 18:33
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@itarato
itarato / bigint.cpp
Created September 15, 2016 05:11
Simple C++ big integer class
#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
using namespace std;
#define GROUP_DEC_SIZE 4
class BigInt {
private:
@danni
danni / fields.py
Created March 8, 2016 08:52
Multi Choice Django Array Field
from django import forms
from django.contrib.postgres.fields import ArrayField
class ChoiceArrayField(ArrayField):
"""
A field that allows us to store an array of choices.
Uses Django 1.9's postgres ArrayField
and a MultipleChoiceField for its formfield.
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active September 20, 2024 17:55
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S