Skip to content

Instantly share code, notes, and snippets.

View lumixraku's full-sized avatar
🌴
On vacation

lumix lumixraku

🌴
On vacation
View GitHub Profile
@pesterhazy
pesterhazy / building-sync-systems.md
Last active September 18, 2024 02:01
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

Minecraft on Apple Silicon

In this gist, you can find the steps to run Minecraft 1.16.4 natively on Apple Silicon (AS), without needing Rosetta 2 translation of the dependencies (mainly LWJGL and related libraries).

While it's possible to use a launcher like MultiMC to have a prettier way to run the game on AS, it requires installing even more dependencies (like QT) which take time and are difficult to distribute. Therefore, I've put together a command line-based launcher tool using a couple shell & Python scripts.

To get up and running quickly, follow the steps below. Otherwise, for more detail, watch my YouTube video.

Download my package

@kaiye
kaiye / injectEgretApiDoc.js
Last active August 4, 2022 02:52
Make the Egret API documents better searchable
(function(oldInput) {
if (!oldInput) return;
if (oldInput.__injected) return;
class DB {
constructor({ database, table, onload = () => {} }) {
this.database = database;
this.table = table;
this.onload = onload;
this.open();
@shlima
shlima / protobuf260.rb
Created April 11, 2019 13:47
brew formula to install protobuf@2.6
class Protobuf260 < Formula
desc "Protocol buffers - Google data interchange format"
homepage "https://github.com/google/protobuf/"
stable do
url "https://github.com/google/protobuf/releases/download/v2.6.0/protobuf-2.6.0.tar.bz2"
sha256 "0a2f8533b2e0587a2b4efce0c4c8aea21bbfae1c41c466634d958dedf580f6aa"
# Fixes the unexpected identifier error when compiling software against protobuf:
# https://github.com/google/protobuf/issues/549

Creating your own Native Modules

Sometime when we need a specific way to interact with the phone or operator system which is various different between iOS and Android, that when we need to lean that responsibility to the OS it self.

In RN, most of the logic and UI, in the best way, must be consistent between platforms. So, In an advance level of bringing best user experience to end user, we need to create native module, that mean the leaning the logic to the Native Part. There are ton of article out there showing why and when we need to create a native module, I won't dive into explanation again. Instead, I will show you how can we create a native module that could be used in React native code. That mean, you write your Objective-C/Java code, and import and run it as a module in Javascript Code.

I will show you here the most basic way to create the most basic library, called: open https://google.com. It means, I want to open Google by using the default iOS/Android browser in a native way.

Creating re

@miku
miku / ProgrammaticNotebook.ipynb
Created March 3, 2018 15:28 — forked from fperez/ProgrammaticNotebook.ipynb
Creating an IPython Notebook programatically
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@baymaxium
baymaxium / content.md
Created October 18, 2017 09:08
最难面试题,你遇到过什么样的?

原文:Python开发者

(点击上方公众号,可快速关注)

来源:伯乐在线 - 刘唱

如有好文章投稿,请点击 → 这里了解详情

【伯乐在线导读】:本文介绍了几道面试中遇到的难题,如果你遇到了这种难题,你会怎么回答呢?

@reagent
reagent / 00_README.md
Last active August 21, 2024 05:12
Custom HTTP Routing in Go

Custom HTTP Routing in Go

Basic Routing

Responding to requests via simple route matching is built in to Go's net/http standard library package. Just register the path prefixes and callbacks you want invoked and then call the ListenAndServe to have the default request handler invoked on each request. For example:

package main

import (
@MehdiNS
MehdiNS / Glsl_include.cpp
Last active May 4, 2019 08:27
Support #include in GLSL
// Credits to "Mon Chic Prof" Pat for the Lines trick.
// This contains clever things, and other not so much.
// But it does the job, and we sometimes need ugliness in order to appreciate the beauty of things.
#include <iostream>
#include <vector>
#include <string>
#include <chrono>
#include <fstream>
#include <string>
@teocomi
teocomi / .gitignore
Created September 13, 2016 15:01
Gitignore for Unity projects
# =============== #
# Unity generated #
# =============== #
[Tt]emp/
[Oo]bj/
[Bb]uild
/[Bb]uilds/
/[Ll]ibrary/
sysinfo.txt
*.stackdump