Skip to content

Instantly share code, notes, and snippets.

View GuyMicciche's full-sized avatar

Guy Micciche GuyMicciche

View GitHub Profile
@devdattaT
devdattaT / getTiles.py
Created July 14, 2014 08:31
Downloading of Slippy Tiles using Shapely.
import math
import os
import urllib
from shapely.geometry import Polygon
def deg2num(lat_deg, lon_deg, zoom):
lat_rad = math.radians(lat_deg)
n = 2.0 ** zoom
xtile = int((lon_deg + 180.0) / 360.0 * n)
ytile = int((1.0 - math.log(math.tan(lat_rad) + (1 / math.cos(lat_rad))) / math.pi) / 2.0 * n)
@praveenvijayan
praveenvijayan / Copy text directly from Photoshop text layer.
Last active December 19, 2019 05:23
Copy text directly from text layer. Works above photoshop cs6. Copy following script file into /Applications/Adobe Photoshop CC 2014/Presets/Scripts (MAC) or C:\Program Files\Adobe\Adobe Photoshop CC 2014\Presets\Scripts (WIN). Assign shortcut for easy access (cmd+option+c / ctrl+alt+c)
/*****************************************************************
*
* Copy Layer text 1.0 - by Praveen Vijayan! - http://www.decodize.com/
*
* Compatibility above Photoshop CS6
*
* Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
*
*****************************************************************/
@hilukasz
hilukasz / Selected_layers-PS.jsx
Last active January 3, 2025 21:07
get array of selected layers in photoshop via extendscript
var docRef = app.activeDocument;
cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };
function newGroupFromLayers(doc) {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putClass( sTID('layerSection') );
@baku89
baku89 / easing-clone-size-gradually.py
Last active September 27, 2016 13:50
C4D Python Effector: Easing new clone's size gradually when cloner's count changed
import c4d
from c4d.modules import mograph as mo
prevCnt = 0
def main():
global prevCnt
md = mo.GeGetMoData(op)
if md==None: return False
@navicore
navicore / mkvpropedit
Last active February 20, 2022 09:22
mkvpropedit to edit the video file title metadata (mkv files)
#!/usr/bin/env bash
#mkvpropedit to edit the video file title metadata (mkv files)
for f in *.mkv; do mkvpropedit "$f" --edit info --set "title=${f%.mkv}"; done
@internetimagery
internetimagery / py2mel.py
Last active August 10, 2022 12:40
Convert Python code to Mel (using mel's python interpreter)
#!/usr/bin/env python
# Python to Mel converter
# Allows running of Python code by dragging into the Maya viewport
# Created 21/04/2015
# Jason Dixon
# [email protected]
# internetimagery.com
# Usage
@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

@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 ];
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;
@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