Skip to content

Instantly share code, notes, and snippets.

View DarthMoulByte's full-sized avatar

DarthMoulByte

View GitHub Profile
@YamilEzequiel
YamilEzequiel / PressedButton.cs
Last active February 7, 2025 12:35
Event Button pressed Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
public class PressedButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
{
public UnityEvent OnHold;
// This Editor extension adds a Open Terminal shortcut and menu item to the unity editor.
// Created by 45Ninjas.
// Works for unity 2019.3 running on Linux with Gnome 3.x.
// You should be smart enough to make it work for other versions or operating systems.
using System.Diagnostics;
using UnityEngine;
using UnityEditor;
using UnityEditor.ShortcutManagement;
@DarthMoulByte
DarthMoulByte / .Windows Optimization.md
Created September 23, 2019 03:49 — forked from imba-tjd/.Windows Optimization.md
记录我使用的软件和优化Windows的操作
import bpy
import bmesh
from bpy.props import FloatProperty
from math import radians
from mathutils.geometry import intersect_point_line
from mathutils import Matrix
class BMeshTriangularFold(bpy.types.Operator):
"""Fold Triangle on edge"""
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@p2or
p2or / blender-generate-mix-shader-example.py
Created June 24, 2019 10:37
Example on how to generate gloss diffuse shader via pyhon #Blender #BSE
# for https://blender.stackexchange.com/q/143599/3710
import bpy
mat_name = "Material_Name"
# check whether the material already exists
if bpy.data.materials.get(mat_name):
mat = bpy.data.materials[mat_name]
else:
#!/usr/bin/env python
# Tutorial available at: https://www.youtube.com/watch?v=uSt80abcmJs
# Feedback welcome: jacksonbates@hotmail.com
from gimpfu import *
def extreme_unsharp_desaturation(image, drawable):
pdb.gimp_image_undo_group_start(image)
radius = 5.0
#!/usr/bin/env python
# Tutorial available at: https://www.youtube.com/watch?v=nmb-0KcgXzI
# Feedback welcome: jacksonbates@hotmail.com
from gimpfu import *
def NAME_OF_MAIN_FUNCTION(image, drawable):
# function code goes here...
@DarthMoulByte
DarthMoulByte / broadcom-wl-dkms.sh
Created October 16, 2018 03:26 — forked from stevenmirabito/broadcom-wl-dkms.sh
Installs the broadcom-wl kernel module with DKMS imortante para arch y otras distros linux
#!/bin/bash
# Installs the broadcom-wl kernel module with DKMS
# Tested under Fedora 23, will likely work with other versions/distros
# Author: Steven Mirabito <smirabito@csh.rit.edu>
# Create a work directory
mkdir -p /tmp/broadcom
cd /tmp/broadcom
# Download the module from Broadcom (http://www.broadcom.com/support/?gid=1)
@DarthMoulByte
DarthMoulByte / xna4_vs2017.md
Created July 20, 2018 03:25 — forked from roy-t/xna4_vs2017.md
Install XNA 4.0 under Microsoft Visual Studio 2017

This guide will provide you with a workaround for using XNA in Visual Studio 2017. This will solve problems with the target files and Microsoft.Build.Framework.dll such as: Error loading pipeline assembly "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.Build.Framework.dll"

  1. Download a modified version of the XNA vsix: https://mxa.codeplex.com/
  2. Unzip XNA Game Studio 4.0.vsix and replace the <Installation /> tag in extension.vsixmanifest with this:
 <Installation InstalledByMsi="false">
    <InstallationTarget Version="[12.0,16.0)" Id="Microsoft.VisualStudio.VSWinDesktopExpress" />
    <InstallationTarget Version="[12.0,16.0)" Id="Microsoft.VisualStudio.Pro" />