Skip to content

Instantly share code, notes, and snippets.

View jrichardsz's full-sized avatar

JRichardsz jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / unity build sandbox
Created May 2, 2024 00:37
unity build sandbox
https://stackoverflow.com/questions/60957159/environment-variable-in-unity-to-differ-between-development-and-production
https://gist.github.com/jonathanpeppers/a64a840d2131939e8752
/opt/Unity/Editor/Unity -projectPath /usr/src/app/ci/base/unity-assetbundle -batchmode -nographics -logFile /dev/stdout -accept-apiupdate -stackTraceLogType Full -executeMethod AssetBundles.AssetBundleBuilder.Build -danjiIds 38017
https://forum.unity.com/threads/caught-fatal-signal-signo-11-code-1-errno-0-addr-0x120-on-linux.1017250/
https://forum.unity.com/threads/released-ucmd-supercharge-unitys-command-line-runner.562246/
@jrichardsz
jrichardsz / parse init file with javascript.js
Created April 21, 2024 21:03
parse init file with javascript
function parseIniString(data) {
var regex = {
section: /^\s*\[\s*([^\]]*)\s*\]\s*$/,
param: /^\s*([^=]+?)\s*=\s*(.*?)\s*$/,
comment: /^\s*;.*$/
};
var value = {};
var lines = data.split(/[\r\n]+/);
var section = null;
lines.forEach(function (line) {
@jrichardsz
jrichardsz / docker Overlay2 size too big
Created April 19, 2024 15:55
docker Overlay2 size too big
du -h . --max-depth=1 | sort -r -h
docker system df
du -shc /var/lib/docker/*
docker ps --size
du -shc /var/lib/docker/overlay2/*/diff
@jrichardsz
jrichardsz / docker truncate logs - snippets.md
Last active May 2, 2024 17:41
docker truncate logs - snippets

/acme/truncate_log.sh

echo "clear container log : $(date)"
df -h
name=$(docker ps --format '{{.Names}}')
log_file=$(docker inspect --format='{{.LogPath}}' $name)
du -h "${log_file}" | cut -f 1
echo "" > $(docker inspect --format='{{.LogPath}}' $name )
du -h "${log_file}" | cut -f 1
@jrichardsz
jrichardsz / c# unit tests.cs
Created April 12, 2024 16:40
c# unit tests
using NUnit.Framework;
using System;
[TestFixture]
public class Tests
{
[Test]
public static void Test1()
{
Assert.AreEqual("emocleW", Kata.SpinWords("Welcome"));
@jrichardsz
jrichardsz / Helper.js
Created April 11, 2024 23:03
html table with javascript, array double to table html
function Helper() {
function getCells(data, type) {
return data.map(cell => `<${type} style="border: 1px solid #000;" >${cell}</${type}>`).join('');
}
function createBody(data) {
return data.map(row => `<tr style="border: 1px solid #000;" >${getCells(row, 'td')}</tr>`).join('');
}
this.generateTable = (data) => {
@jrichardsz
jrichardsz / opera snippets
Created April 9, 2024 01:31
opera snippets
https://addons.opera.com/en/extensions/details/vertical-tabs/
@jrichardsz
jrichardsz / github contributors template.md
Created April 1, 2024 15:31
github contributors template
  • create your account in restdb.io
  • creat a database
  • enter to your databae and save the base url

image

image

  • enable the developer mode
#launch agent
bash /log-agent.sh > /dev/null 2>&1 &
#launch java app
java -jar ....