Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* QR Code + Logo Generator
*
* http://labs.nticompassinc.com
*/
$data = isset($_GET['data']) ? $_GET['data'] : 'http://labs.nticompassinc.com';
$size = isset($_GET['size']) ? $_GET['size'] : '200x200';
$logo = isset($_GET['logo']) ? $_GET['logo'] : FALSE;
<?php
/**
* QR Code + Logo Generator
*
* http://labs.nticompassinc.com
*/
$data = isset($_GET['data']) ? $_GET['data'] : 'http://labs.nticompassinc.com';
$size = isset($_GET['size']) ? $_GET['size'] : '200x200';
$logo = isset($_GET['logo']) ? $_GET['logo'] : FALSE;
// important: note the priority of 99, the js needs to be placed after tinymce loads
// important: note that this assumes you're using http://wordpress.org/extend/plugins/verve-meta-boxes/
// to create the textarea - otherwise change your selector
function admin_add_wysiwyg_custom_field_textarea()
{ ?>
<script type="text/javascript">/* <![CDATA[ */
jQuery(function($){
var i=1;
$('.verve_meta_box_content textarea').each(function(e)
import pymel.core as pm;
class MirrorControl(object):
def __init__(self):
#store your controls in a variable
controls=pm.ls(sl= True);
#calling our class attribute to mirror the controls
self.mirrorControls(controls);
def mirrorControls(self,*args):
@epicallan
epicallan / joint curve on point
Created November 29, 2014 12:14
Python script for maya that creates curves in form of a joint on a selected vertice, with a gui window having a name and radius field
'''
Created on 28 Sep 2014
@author: epicallan.al@gmail.com
'''
import pymel.core as pm;
from functools import partial;
class JointCurve(object):
def __init__(self):
#window name and set up, variables
@epicallan
epicallan / ThemeClass
Last active August 29, 2015 14:15
Creating modular wordpress page templates with classes
<?php
/**
* themes class
* included on page templates by use of
* a template redirect hook
*/
class ThemeClass
{
protected $data;
@epicallan
epicallan / wordpress template page class example
Last active August 29, 2015 14:15
Making use of a wordpress loop in a class
<?php
/**
* Template Name: mytemplate-page
* Description: a template page using a class
*
*/
?>
<?php
$args = array(
"type"=>"post_type_name",
@epicallan
epicallan / openmaya Api example
Created February 8, 2015 10:07
Openmaya API example
import maya.OpenMaya as om;
class MyClass(object):
def __init__(self):
#instantiating selection list function set
selectionList=om.MSelectionList();
#get currect selected object and put it into the selectionlist
om.MGlobal.getActiveSelectionList(selectionList);
self.getObject(selectionList);
@epicallan
epicallan / Maya mirror control python script
Created February 8, 2015 10:11
Maya mirror control python script
pymel.core as pm;
class MirrorControl(object):
def __init__(self):
#store your controls in a variable
controls=pm.ls(sl= True);
#calling our class attribute to mirror the controls
self.mirrorControls(controls);
def mirrorControls(self,*args):
[
{ "keys": ["ctrl+shift+s"], "command": "auto_save" },
{ "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+/"], "command": "toggle_comment", "args": { "block": true } },
{"keys":["ctrl+r"] ,
"caption": "SublimeREPL: Python - RUN current file",
"command": "run_existing_window_command",