Skip to content

Instantly share code, notes, and snippets.

View baku89's full-sized avatar
🍡

Baku 麦 baku89

🍡
View GitHub Profile
@baku89
baku89 / .zshrc
Last active March 21, 2016 15:21
cdw
cdw() {
cd ${WORKDIR}
if [ $# != 0 ]; then
cd ${WORKDIR}
projDir=$(ls | grep ${1})
if [ -d "$projDir" ]; then
cd ${projDir}
else
echo "\"${1}\" does not exists \n"
ls
@baku89
baku89 / .zshenv
Last active March 21, 2016 15:44
My work-related shell scripts & zsh configs
WORKROOT=${HOME}/Works
WORKDIR=${WORKROOT}/$(date +"%Y")
@baku89
baku89 / apple-emoji.txt
Last active May 26, 2016 09:26
👍 Skin Tone Gradients
👍🏻👍🏼👍🏽👍🏾👍🏿👍🏾👍🏽👍🏼
> fcurve@0.0.1 test /Users/mugi/Dropbox/Works/2016/30_fcurve/fcurve
> NODE_ENV=test mocha --compilers js:babel-register test/test.js
diff test
[0 ] target= 0.0000 value= 0.0000 diff= 0.00000000
[1 ] target=+0.0867 value=+0.0867 diff=-0.00000038
[2 ] target=+0.3618 value=+0.3618 diff=+0.00000961
@baku89
baku89 / OSX Example
Last active September 1, 2016 11:39 — forked from rc1/OSX Example
Command line arguments in openFrameworks
open -n ./emptyExampleDebug.app/ --args --myargs 1 2 3 4
@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
@baku89
baku89 / count_keyframes_c4d.py
Created December 5, 2015 04:33
Count keyframes of active document
from c4d import gui
import shutil
num = 0
def countObjectKeyframe(obj):
global num
tracks = obj.GetCTracks()
@baku89
baku89 / Python Tag
Last active September 27, 2016 13:53
C4D: Make only nth child object visible
# Add User Data (ID=1) as Integer
# In python tag
def main():
b = op.GetObject()
idx = b[c4d.ID_USERDATA,1]
children = b.GetChildren()
for i, c in enumerate(children):
v = 2 if idx == i else 1
@baku89
baku89 / ofApp.cpp
Created October 13, 2016 18:34 — forked from satoruhiga/ofApp.cpp
GenUVLayout
#include "ofApp.h"
const int NUM_LED_PER_RING = 13;
const int NUM_ROW_IN_UV_LAYOUT = 6;
const int PIXEL_SIZE = 4;
const int PIXEL_MARGIN = 4;
const int STRIP_MARGIN = 10;
const int LAND_TEXT_HEADER_MARGIN = 60;
const int LAND_MARGIN = 20;
@baku89
baku89 / export_video_inceptionism.py
Created October 30, 2016 01:03
My first video deep-dream
from batcountry import BatCountry
import numpy as np
from PIL import Image
from glob import glob
import os
import random
CAFFE_ROOT = '../caffe'
INPUT_PATH = 'input.jpg'