Skip to content

Instantly share code, notes, and snippets.

@j-mai
j-mai / README.md
Last active July 22, 2024 19:19
A guide for using Unity and Git

Using Git with Unity

What are the problems?

  • Noise: Unity editor has lots of temporary files that we don’t want git to track
  • Broken object references: Unity keeps track of objects created by using random GUIDs, and if they aren’t tracked using .meta files then there can be conflicts that really break your project
  • Unresolvable merge conflicts: files like scene files that are written in confusing languages (like YAML) that are supposed to be translations of Unity editor actions into code. Most likely, you cannot resolve using Git, and the only way to resolve merge conflicts is to open it in a text editor and resolve them manually while hoping you don't mess anything up because these files are confusing and not meant to be manipulated directly.
  • Large files: Sometimes assets are large and take up a lot of storage space

💻 Project Setup

@coeusite
coeusite / Pixel_CT4G.md
Last active June 7, 2024 11:21
Pixel 破解电信 4G 记录
#!/usr/bin/bash
DIR=/path/to/www/public
DATA=/path/to/pms5003.rrd
TIME=$1
time=$(date '+%H\:%M\:%S')
rrdtool graph $DIR/pm-$TIME.svg \
--imgformat SVG \
@timshen91
timshen91 / kmp.cc
Last active September 29, 2015 14:40
int Kmp(const std::string& a, const std::string& b) {
if (b.empty()) {
return 0;
}
int n = (int)b.size();
std::vector<int> p(n);
if (n > 1) {
p[1] = 0;
}
for (int i = 2, j = 0; i < n; i++) {
@ahxxm
ahxxm / upyun_podcast_uploader.py
Last active September 7, 2015 13:29
upyun podcast uploader with filename-as-cache
import os
import upyun
from progressbar import *
# http://stackoverflow.com/questions/1192978/python-get-relative-path-of-all-files-and-subfolders-in-a-directory
myFolder = "/podcast/pod/podcasts/"
os.chdir(myFolder)
fileSet = set()
@staltz
staltz / introrx.md
Last active July 29, 2024 05:55
The introduction to Reactive Programming you've been missing