Naive bash script to convert a Wavefront OBJ (as created by Blender) into JavaScript arrays:
$ ./obj2js < model.obj > model.js
Will print something like:
#!/usr/bin/env bash | |
# Post a tweet | |
# | |
# @param ... - tweet | |
tweet() | |
{ | |
# Make a SSL request | |
# | |
# @param ... - request arguments |
I hereby claim:
To claim this, I am signing this object:
size 320 | |
fitts 1 | |
title 1 | |
font Sans 8.0 | |
compositing 1 | |
ignore-mask Num_Lock |
#!/usr/bin/env bash | |
# Print n blank lines | |
# | |
# @param 1 - number of blank lines to print (default 1) | |
blanks() { | |
local I | |
for (( I=${1:-1}; I--; )) | |
do | |
echo |
#!/usr/bin/env bash | |
# Replace that boring variable names with funny emojis in your Swift code | |
# | |
# @param 1 - file to emojize | |
emojize() { | |
local FILE=$1 | |
local EMOJI=(😀 😬 😁 😂 😃 😄 😅 😆 😇 😉 😊 🙂 🙃 😋 😌 😍 😘 😗 😙 😚 😜 😝 😛 🤑 🤓 😎 🤗 😏 😶 😐 😑 😒 🙄 🤔 😳 😞 😟 😠 😡 😔 😕 🙁 😣 😖 😫 😩 😤 😮 😱 😨 😰 😯 😦 😧 😢 😥 😪 😓 😭 😵 😲 🤐 😷 🤒 🤕 😴 💤 💩 😈 👿 👹 👺 💀 👻 👽 🤖 😺 😸 😹 😻 😼 😽 🙀 😿 😾 🙌 👏 👋 👍 👊 👌 💪 🙏 👆 👇 👈 👉 🖕 🤘 🖖 💅 👄 👅 👂 👃 👁 👀 👤 🗣 👶 👦 👧 👨 👩 👱 👴 👵 👲 👳 👮 👷 💂 🕵 🎅 👼 👸 👰 🚶 🏃 💃 👯 👫 👬 👭 🙇 💁 🙅 🙆 🙋 🙎 🙍 💇 💆 💑 💏 👪) | |
local EMOJI_LEN=${#EMOJI[@]} | |
local I=0 |
#!/usr/bin/env bash | |
# Add, commit, tag and push | |
tag_and_push() | |
{ | |
# find version (x.x.x) in uncommitted changes | |
local VERSION='' | |
VERSION=$(git diff -U0 | | |
grep -E "^\+.*([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})") |
import android.content.Context; | |
import android.content.res.Configuration; | |
import android.content.res.Resources; | |
import android.graphics.Point; | |
import android.os.Build; | |
import android.util.TypedValue; | |
public class SystemBarMetrics { | |
public static int getStatusBarHeight(Resources res) { | |
return getIdentifierDimen(res, "status_bar_height"); |
Synchronize (the contents of) a repository with a local directory. Can be used to manually update "embedded" repositories (aka subtree's).
Does not touch the host repository's stage or history. You have to add and commit the changed files manually. Write a good commit message and have a clean history.