Skip to content

Instantly share code, notes, and snippets.

@famence
famence / okei.json
Created February 15, 2020 06:21
ОКЕИ (Общероссийский Классификатор Единиц Измерения) в формате JSON.
[
{
"code": "354",
"name": "Секунда",
"shortName": "с",
"codeName": "С"
},
{
"code": "355",
"name": "Минута",
@reduz
reduz / godot_over_time1.md
Last active May 19, 2024 02:44
Godot source code in 2002

This is a walkthrough to the Godot codebase over time. I can't publish full repositories, but I will put here the interfaces of some APIs including the year they were created and how they looked like at the time.

2002, Larvotor

This was the first version of the engine as such. It was later on used to create Regnum Oline. This is source code where I am sure I can still put legally here. Here are some class interfaces.

Mesh class:

@russorat
russorat / install_ngrok.md
Last active May 19, 2024 02:44 — forked from SalahHamza/install_ngrok.md
How to install ngrok on linux subsystem for windows
@handstandsam
handstandsam / MyLifecycleOwner.kt
Last active May 19, 2024 02:18
Jetpack Compose OverlayService. You have to have all the correct permissions granted and in your manifest, but if you do, this this will show a green box with "Hello" in it!
import android.os.Bundle
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleRegistry
import androidx.savedstate.SavedStateRegistry
import androidx.savedstate.SavedStateRegistryController
import androidx.savedstate.SavedStateRegistryOwner
internal class MyLifecycleOwner : SavedStateRegistryOwner {
private var mLifecycleRegistry: LifecycleRegistry = LifecycleRegistry(this)
private var mSavedStateRegistryController: SavedStateRegistryController = SavedStateRegistryController.create(this)
@ajayvignesh01
ajayvignesh01 / Tweet.tsx
Created February 24, 2024 06:03
A Tiptap extension to embed Tweets
import { NodeViewProps, NodeViewWrapper } from '@tiptap/react'
import { nodePasteRule, ReactNodeViewRenderer } from '@tiptap/react'
import { mergeAttributes, Node } from '@tiptap/core'
import { Tweet } from 'react-tweet'
export const TweetComponent = ({ node }: NodeViewProps) => {
const url = node.attrs.url
const tweetIdRegex = /\/status\/(\d+)/g
const id = tweetIdRegex.exec(url)?.[1]
@tobyselway
tobyselway / laravel_setup.md
Last active May 19, 2024 01:50
Initial Setup for Laravel Projects

Initial Setup

1. Clone the repository

Find a location on your computer where you want to store the project. A directory made for projects is generally a good choice.

Launch a bash console there and clone the project.

git clone https://github.com/organization/project.git

2. cd into the project

@NordicGamerFE
NordicGamerFE / performancemodsold.md
Last active May 19, 2024 01:50
Performance mods 1.8.9 and below

Performance Mods

A list of performance-enhancing mods for 1.8.9 and below.

Any suggestions/complaints?
Join our discord or use the gist comments.

Mods marked as "Dangerous" might be unstable, and cause some unexpected behaviour.

Home

Forge 1.8.9

@dhh
dhh / linux-setup.sh
Last active May 19, 2024 02:21
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl btop \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@sasadep
sasadep / mat_to_csv.py
Created January 4, 2017 23:18
convert .mat file to .csv file
import scipy.io
import pandas as pd
mat = scipy.io.loadmat('path_to_/fiename.mat')
mat = {k:v for k, v in mat.items() if k[0] != '_'}
data = pd.DataFrame({k: pd.Series(v[0]) for k, v in mat.iteritems()})
data.to_csv("fiename.csv")