Skip to content

Instantly share code, notes, and snippets.

View marvpaul's full-sized avatar
💻
Working from home

Marvin Krueger marvpaul

💻
Working from home
View GitHub Profile
@krisrok
krisrok / Editor\EnableFileSharingPostBuildProcessor.cs
Created October 17, 2018 20:28
Auto-enable ITunes file sharing for Unity app (put script in an Editor-folder)
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
public class EnableFileSharingPostBuildProcessor
{
[PostProcessBuild]
public static void ChangeXcodePlist(BuildTarget buildTarget, string pathToBuiltProject)
{
@niespodd
niespodd / package.json
Last active May 8, 2023 09:07
Making web3/bitcore-lib work with Angular 6-11 and >=11
{...
"scripts": {
"postinstall": "node patch.js",
...
}
}
@mairod
mairod / Webgl shader Hue Shift function
Last active February 10, 2024 16:57
Optimised Hue shift function in GLSL
vec3 hueShift( vec3 color, float hueAdjust ){
const vec3 kRGBToYPrime = vec3 (0.299, 0.587, 0.114);
const vec3 kRGBToI = vec3 (0.596, -0.275, -0.321);
const vec3 kRGBToQ = vec3 (0.212, -0.523, 0.311);
const vec3 kYIQToR = vec3 (1.0, 0.956, 0.621);
const vec3 kYIQToG = vec3 (1.0, -0.272, -0.647);
const vec3 kYIQToB = vec3 (1.0, -1.107, 1.704);
@mattatz
mattatz / GradientTexGen
Created November 28, 2016 04:14
Gradient Texture2D Generator for Unity.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
using System.IO;
using System.Collections;
namespace mattatz.Utils {
@aras-p
aras-p / SkyboxBackgroundTexture.shader
Last active January 9, 2024 00:28
Unity flat skybox picture shader
// Skybox shader that just draws flat texture in the background
Shader "Skybox/Background Texture"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "Queue"="Background" "RenderType"="Background" "PreviewType"="Skybox" }
@tonymtz
tonymtz / gist:714e73ccb79e21c4fc9c
Created November 15, 2014 00:02
Uninstall XQuartz.app from OSX Yosemite
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg
# Log out and log in
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@gleitz
gleitz / MIDI_scales.js
Last active February 11, 2024 06:17
MIDI scale arrays in Javascript
var scales = {
'natural major': [0,2,4,5,7,9,11,12],
'ionian': [0,2,4,5,7,9,11,12],
'major': [0,2,4,5,7,9,11,12],
'chromatic': [0,1,2,3,4,5,6,7,8,9,10,11,12],
'spanish 8 tone': [0,1,3,4,5,6,8,10,12],
'flamenco': [0,1,3,4,5,7,8,10,12],
'symmetrical': [0,1,3,4,6,7,9,10,12],
'inverted diminished': [0,1,3,4,6,7,9,10,12],
'diminished': [0,2,3,5,6,8,9,11,12],
@EvanHahn
EvanHahn / gist:2587465
Last active October 9, 2023 01:26
Caesar shift in JavaScript
/*
JavaScript Caesar shift
by Evan Hahn (evanhahn.com)
"Encrypt" like this:
caesarShift('Attack at dawn!', 12); // Returns "Mffmow mf pmiz!"
And "decrypt" like this: