This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//server side: | |
GIT_DIR=project.git git init | |
cd project.git | |
git --bare update-server-info | |
cp hooks/post-update.sample hooks/post-update | |
//on client side: | |
git clone ssh://<username>@<remote-git-hostname>/path/to/dir.git | |
//on first push to master: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git push origin <branchname> | |
git branch --set-upstream <branchname> origin/<branchname> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//First, in your working tree, locally rename master to something else. | |
git branch -m master old-dev | |
//Renaming a branch does work while you are on the branch, so there's no need to checkout something else. | |
//Then, locally rename the maintenance branch (2.63-branch) to master: | |
git branch -m 2.63-branch master | |
//Now, time to mess with the remote. Just in case you screw up, you might want to make sure you have a current backup. First, //delete the remote's master: | |
git push origin :master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.cmds as cmds | |
import maya.mel as mel | |
mopathCurve=cmds.ls(sl=True) | |
for pathCurve in mopathCurve: | |
print cmds.arclen(mopathCurve) | |
cmds.select(pathCurve+'.cv[*]') | |
pathCvs=cmds.ls(sl=True, fl=True) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data') | |
return; | |
} | |
if(!filename) filename = 'Untitled.obj' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
objStringFromBufferGeometry: function (geom) { | |
var s = ''; | |
var geometry = new THREE.Geometry().fromBufferGeometry( geom ); | |
for (var i = 0; i < geometry.vertices.length; i++) { | |
var vertex = geometry.vertices[i]; | |
s += 'v '+ vertex.x + ' ' + vertex.y + ' '+ vertex.z + '\n'; | |
} | |
for (var i = 0; i < geometry.faces.length; i++) { | |
s += 'f '+ (geometry.faces[i].a+1) + ' ' + (geometry.faces[i].b+1) + ' ' + (geometry.faces[i].c+1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# a script that extracts the subtitle file of every mkv movie file and saves it with the same name | |
# copy to the folder where the mkv files live and run "./mkvextractTracks.sh" in terminal | |
# options: [trackID] | |
# example: ./mkvextractTracks.sh 1 | |
# | |
# info: | |
# mkvextract is used to extract the subtitles, so mkvtoolnix app (which contains the mkvextract binary) is used: | |
# https://mkvtoolnix.download/downloads.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# batch resize @3x iOS image assets to @2x and @1x | |
# copy this script to the folder where the @3x images files live and run "./resizer3x.sh" in terminal. | |
# this will generate [filename]@2x.[extension] and [filename].[extension] images in the same folder | |
# Ensure we're running in location of script. | |
cd "`dirname $0`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# batch conversion: extract audio from all mp4's in sourceFolder and its subfolders and save as mp3. | |
# e.g. python extractAudioFromMp4.py sourceFolder destinationFolder | |
import sys | |
import os | |
from glob import glob | |
from subprocess import call | |
import shlex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# batch conversion: convert all .wav files in sourceFolder and its subfolders to mp3 or aifc. | |
# e.g. python convertAudioFiles.py sourceFolder destinationFolder 0 | |
import sys | |
import os | |
from glob import glob | |
from subprocess import call | |
import shlex |
OlderNewer