Skip to content

Instantly share code, notes, and snippets.

rdeeb / get_associated_terms.php
Last active May 6, 2018
This piece of code gets the categories used by a list of posts in Wordpress, this also can be filtered to only show categories that are children of an specific category
View get_associated_terms.php
* This function will return a list of categories used by a group of posts ids
* @param string $taxonomy The name of the taxonomy to search for
* @param array $objects_id The list of posts IDs to check against
* @param integer $child_of A parent category to limit the search on
* @return array A list of terms
rdeeb / BoundryFinder.cs
Created Mar 17, 2016
Get the viewport size of an orthographic camera in unity
View BoundryFinder.cs
public class BoundryFinder : MonoBehaviour
public float xMin, xMax, zMin, zMax;
void Start()
GameObject sceneCamObj = GameObject.Find( "Main Camera" );
Camera mainCam = sceneCamObj.GetComponent<Camera> ();
Transform camPos = mainCam.transform;