Skip to content

Instantly share code, notes, and snippets.

View GuyMicciche's full-sized avatar

Guy Micciche GuyMicciche

View GitHub Profile
@nlac
nlac / splitter.js
Last active March 20, 2024 02:05
A small js snippet to split a merged audio track to parts by silence analysis. Based on ffmpeg "silencedetect" filter and node.js.
/**
* This javascript snippet is able to split a merged audio track to parts by silence analysis
* It is based on ffmpeg (https://ffmpeg.org), especially on the silencedetect filter (https://ffmpeg.org/ffmpeg-filters.html#silencedetect)
*
* Assumptions:
* - nodejs is installed
* - ffmpeg is installed
*
* Usage:
* - fill the options object
@blenderdeluxe
blenderdeluxe / vray_subdivision_to_multiple_objects.py
Created April 12, 2017 23:14
Add vray subdivision to multiple objects in Maya
#Run script in python view on script editor
#Select all objects that need apply vray subdivision
#Execute in maya python console makeVrayAttributes(1)
import maya.cmds as cmds
import maya.mel as mel
def makeVrayAttributes(startID=1):
sel = cmds.ls(sl=1)
currentID=startID
@fredrikaverpil
fredrikaverpil / click2dto3d.py
Last active January 9, 2025 13:00
On Maya click: 2d coordinates to 3d world coordinates
import maya.api.OpenMaya as om
import maya.api.OpenMayaUI as omui
import maya.cmds as cmds
# Maya Python API:
# http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__py_ref_index_html
def onPress():
"""Take x,y from mouse click, convert into 3d world coordinates"""
@seanriceaz
seanriceaz / PS-SavePairsOfLayers.jsx
Last active October 3, 2016 18:08
This script will loop through layers in the first two layer groups in a photoshop file toggling them one by one and exporting a png of each flattened combination
// This script will loop through layers in the first two layer groups
// in a photoshop file toggling them one by one and exporting a png of
// each flattened combination
// NOTE: Start the file with all the grouped layers set invisible,
// but the groups themselves visible, and any non-grouped layets you want
// to put in all the files visible.
#target photoshop
@har07
har07 / BaseViewModel.cs
Last active February 24, 2023 17:16
Xamarin.Form : Binding item's IsVisible according to ListView selection
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
namespace BasicListView
{
public class BaseViewModel : INotifyPropertyChanged
{
@nzhul
nzhul / LayersToPNG.jsx
Created January 26, 2016 23:09
Spine 2D - LayersToPNG.jsx fix for Photoshop CC
// This script exports photoshop layers as individual PNGs. It also
// writes a JSON file that can be imported into Spine where the images
// will be displayed in the same positions and draw order.
// Setting defaults.
var writePngs = true;
var writeTemplate = false;
var writeJson = true;
var ignoreHiddenLayers = true;
var pngScale = 1;
@RedTahr
RedTahr / CarouselLayout.cs
Created January 6, 2016 20:01
My copy of chrisriesgo / xamarin-forms-carouselview using Montemagno's FrenchPressTimer (see gist > Timer.cs)
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
// using System.Timers;
using Xamarin.Forms;
namespace ....Core.Control
{
public class CarouselLayout : ScrollView, IDisposable
public sealed class Snackbar : UIView
{
public TimeSpan Duration { get; set; }
public Action<Snackbar> OnAction { get; set; }
public Action<Snackbar> OnDismiss { get; set; }
private static Snackbar _currentlyVisibleSnackbar;
private readonly UILabel _messageLabel;
private readonly UIButton _actionButton;
private readonly UIView _separator;
private NSLayoutConstraint[] _horizontalLayoutConstraints;
@joonaspaakko
joonaspaakko / Circulate foreground color.jsx
Last active October 11, 2023 16:45
The script switches foreground color to the next color in the "colors" variable each time you run the code.
#target photoshop
// https://gist.github.com/joonaspaakko/347c270f15bc1d11efe9
var colors = [ "#0033ff", "#9a3838", "#888888", "#a6ad1e" ];
function init() {
var read = tempFile.read(),
color = colors[ read ];
@ahmedlhanafy
ahmedlhanafy / android.md
Last active January 31, 2024 10:46 — forked from geekygecko/android.md
Android Cheat Sheet

Android Cheat Sheet

Developer tips

Ripple Effect

android:clickable="true"
android:background="?attr/selectableItemBackground"

or