Skip to content

Instantly share code, notes, and snippets.

@codedependant
codedependant / dabblet.css
Created October 9, 2012 13:27
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@codedependant
codedependant / css_center_horizontal_list.css
Created November 12, 2012 09:13
css Center Horizontal List
ul.carousel-dots
{
font-family:Verdana, Arial, Helvetica, sans-serif;
text-align: center;
padding-bottom: 0px;
padding-top: 0px;
padding-left: 0;
margin-top: 0;
margin-left: 0;
width: 100%;
@codedependant
codedependant / Maya Python Per Pixel Expression.mel
Created November 12, 2012 09:17
Maya Python Per Particle Expression
After Dynamics Expression
global proc setPoint(float $_index,vector $_p){
setAttr("bezierShape"+1+".controlPoints["+($_index)+"].xValue",$_p.x);
setAttr("bezierShape"+1+".controlPoints["+($_index)+"].yValue",$_p.y);
setAttr("bezierShape"+1+".controlPoints["+($_index)+"].zValue",$_p.z);
}
int $id = nParticleShape1.particleId;
vector $p = nParticleShape1.position;
@codedependant
codedependant / Maya_Python_Select_Verticies_by_Material.py
Created November 12, 2012 09:21
Maya Python Select Verticies by Material
import pymel.core as pm
import maya.cmds as cmds
cmds.hyperShade(o="lambert1")
cmds.ConvertSelectionToVertices()
#shrink selected region to avoid border verticies
cmds.ShrinkPolygonSelectionRegion()
@codedependant
codedependant / authorized_keys_command
Created December 19, 2012 17:35
Run Command on SSH Login - authorized_keys
command="/root/scripttorun argument1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty <public key>s
@codedependant
codedependant / index.haml
Created December 30, 2012 15:34
A CodePen by Che.
%link(href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css')
%ul.row-fluid.grid
%li.span2
%h4 Header
%li.span2
%h4 Header
%li.span2
%h4 Header
%li.span2
@codedependant
codedependant / sublime.sh
Created January 25, 2013 09:58
Install Sublimte Text Ubuntu
#BECOME SUPER USER#
sudo -i
#add sublime to repository#
add-apt-repository ppa:webupd8team/sublime-text-2
#update#
@codedependant
codedependant / FaceDetect.py
Last active December 14, 2015 09:50
Face Detection with OpenCV
import numpy as np
import cv2
import cv2.cv as cv
from video import create_capture
from common import clock, draw_str
import MySQLdb
@codedependant
codedependant / GPSImage.py
Created March 1, 2013 22:01
Pulls GPS info from an image
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS
def get_exif_data(image):
"""Returns a dictionary from the exif data of an PIL Image item. Also converts the GPS Tags"""
exif_data = {}
info = image._getexif()
if info:
for tag, value in info.items():
decoded = TAGS.get(tag, tag)
@codedependant
codedependant / git_statuses.sh
Created March 13, 2013 17:37
Bash script to run "git status" in all child directories of a given parent directory
#!/bin/bash
FOLDER=`pwd`
if [ $# -eq 1 ]
then
FOLDER=`readlink -f $1`
fi