Skip to content

Instantly share code, notes, and snippets.

View BennyFranco's full-sized avatar

Benny BennyFranco

View GitHub Profile
@BennyFranco
BennyFranco / .gitattributes
Created November 24, 2022 02:48 — forked from FullStackForger/.gitattributes
.gitattributes for Unity3D with git-lfs
# Unity
*.cginc text
*.cs diff=csharp text
*.shader text
# Unity YAML
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
1. Create a fresh, bare clone of your repository
git clone --bare https:/github.com/...your-repo.git
2. cd repo.git
3.Copy and paste the script, replacing the following variables(OLD-EMAIL,CORRECT_NAME, CORRECT_EMAIL) based on the information you gathered:
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL=old-email@email.com
@BennyFranco
BennyFranco / MiniJSON.cs
Created October 15, 2020 09:06 — forked from darktable/MiniJSON.cs
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
@BennyFranco
BennyFranco / lib.toml
Created April 26, 2019 01:50
Read a toml file config and download a binary file with libcurl
[lib]
name = "SFML"
filename ="SFML-2.5.1-windows-vc15-64-bit.zip"
url ="https://github.com/SFML/SFML/releases/download/2.5.1/SFML-2.5.1-windows-vc15-64-bit.zip"
@BennyFranco
BennyFranco / get_sfml.rs
Created April 26, 2019 00:34
Get and save binary file with Rust and libcurl
use curl::easy::Easy;
use std::fs::File;
use std::io::prelude::*;
fn main() -> std::io::Result<()> {
let mut dst = Vec::new();
let mut easy = Easy::new();
easy.url("https://github.com/SFML/SFML/releases/download/2.5.1/SFML-2.5.1-windows-vc15-64-bit.zip").unwrap();
let _redirect = easy.follow_location(true);
@BennyFranco
BennyFranco / restart coreaudio daemon
Created March 17, 2019 11:08 — forked from felipecsl/restart coreaudio daemon
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
__attribute__((optnone)) functionName()
{
...
}