Skip to content

Instantly share code, notes, and snippets.

View Nesh108's full-sized avatar

Nesh Nesh108

View GitHub Profile
@Nesh108
Nesh108 / golang-tls.md
Created July 3, 2016 15:52 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
    
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
@Nesh108
Nesh108 / ParallaxPlacer.cs
Last active February 27, 2019 08:37
Parallax Placer Gist
using UnityEngine;
[ExecuteInEditMode]
public class ParallaxPlacer : MonoBehaviour
{
[SerializeField] private ParallaxSettings Settings;
[SerializeField] private SpriteRenderer[] ParallaxObjects;
void LateUpdate()
{
@Nesh108
Nesh108 / DiscordLogger.cs
Last active February 8, 2024 01:59
Unity Logger for posting Errors to Discord channel
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Networking;
// License: MIT
// Created by: Aceria_
// Edited by: Nesh108
// To use, add these to any MonoBehaviour:
// OnEnable: `Application.logMessageReceived += DiscordLogger.HandleLog;`
@Nesh108
Nesh108 / CustomComponentMenu.cs
Created April 17, 2020 14:37
Unity - How to create custom menu for Components
using UnityEditor;
using UnityEngine;
public class CustomComponentMenu : MonoBehaviour
{
// Object is for any component type
[MenuItem("CONTEXT/Object/Move Top")]
static void MoveTop(MenuCommand command)
{
// Making sure it goes to the top
@Nesh108
Nesh108 / trigger_builds.sh
Last active April 22, 2020 07:38
Unity3D-CI: Running Automated Builds via Script - Simple
#!/usr/bin/env bash
set -ex
LICENSE_PATH="<PATH_TO_YOUR_LICENSE_FILE>"
export UNITY_VERSION="2019.3.9f1"
export BUILD_NAME="<YOUR_PROJECT_NAME>"
export UNITY_LICENSE_CONTENT="$(cat $LICENSE_PATH)"
export UNITY_USERNAME="<YOUR_UNITY_USERNAME>"
@Nesh108
Nesh108 / trigger_builds.sh
Created April 22, 2020 07:40
Unity3D-CI: Running Automated Builds via Script - Discord Message
#!/usr/bin/env bash
set -ex
LICENSE_PATH="<PATH_TO_YOUR_LICENSE_FILE>"
export UNITY_VERSION="2019.3.9f1"
export BUILD_NAME="<YOUR_PROJECT_NAME>"
export UNITY_LICENSE_CONTENT="$(cat $LICENSE_PATH)"
export UNITY_USERNAME="<YOUR_UNITY_USERNAME>"
@Nesh108
Nesh108 / setup_gitlab_runner.sh
Created April 22, 2020 07:49
Setup GitLab Runner for Automated Builds
sudo gitlab-runner register \
--name BuildRunner \
--executor shell \
--non-interactive \
--registration-token <TOKEN> \
--url <REPO_URL> \
--tls-ca-file <PATH_TO_LETSENCRYPT_FULLCHAIN_PEM> \
--run-untagged true
# Activate it
@Nesh108
Nesh108 / credentials.json
Created April 22, 2020 07:59
Dispatch Build System Credentials Template
{
"BotCredentials": {
"application_id": "<APP_ID>",
"token": "<BOT_TOKEN>"
}
}
@Nesh108
Nesh108 / get_latest_commits.sh
Created April 22, 2020 08:11
Git - Show Commits since TAG
TAG="${%1}..HEAD"
git log --pretty=format:"- %s" $TAG
@Nesh108
Nesh108 / praat_speech_processing.py
Created December 16, 2022 13:37
[Speed Processing] Processing Praat TextGrids to calculate F1, F2 and F0 of angry and sad emotion files.
import glob
import tgt
import sys
import parselmouth
import statistics
DEBUG = False
def get_f0_mean_stdev(filesSounds):
sum = 0