Skip to content

Instantly share code, notes, and snippets.

View peterobbin's full-sized avatar
👾
[ ]

Luobin Wang peterobbin

👾
[ ]
View GitHub Profile
#!/usr/bin/env python3
import shlex
import subprocess
import uharfbuzz as hb
font_dir = 'fonts/g/mac/10.15.7/'
font_path = f'{font_dir}Hiragino Kaku Gothic W4.ttc'
font_path = f'{font_dir}Hiragino MaruGothic ProN W4.ttc'
font_path = f'{font_dir}Hiragino Mincho ProN.ttc'
@tyhenry
tyhenry / list-of-addons-git.sh
Last active December 4, 2020 06:51
list ofxAddons for OF project, with git repo / version info > 'addons.git.make'
#!/bin/bash
# list-of-addons-git.sh
#
# to be run inside of an openFrameworks project with 'addons.make' file.
# writes 'addons.git.make' - list addons and git repo urls, branches, and commits to 'addons.git.make' file
INPUT="addons.make" # addons list file
OUTPUT="addons.git.make" # output file
@vikpe
vikpe / fix_authenticity_of_github_problem.md
Last active July 12, 2024 07:39
FIX: The authenticity of host github.com can't be established.

Error

The authenticity of host 'github.com (140.82.113.4)' can't be established.

Fix

ssh-keyscan github.com >> ~/.ssh/known_hosts
@quaternioninterpolation
quaternioninterpolation / ImageDOCrossfade.cs
Last active May 11, 2024 09:51
DOTween UnityEngine.UI.Image image cross fade
/** --
** Copyright (C) 2019 by Josh van den Heever
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in
** the Software without restriction, including without limitation the rights to
** use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
** of the Software, and to permit persons to whom the Software is furnished to
** do so, subject to the following conditions:
**
# quick git CLI command to view latest commits across all refs on a repo:
# paste this to create alias
git config --global alias.refs "for-each-ref refs/ --sort=committerdate --format='%(color:red)%(committerdate:short) %(color:yellow)%(objectname:short) %(align:25,left)%(color:cyan)%(refname:short)%(end) %(color:magenta)%(subject) %(color:green)%(authorname)'"
# use command
git refs
@jeffpamer
jeffpamer / encode.sh
Created March 16, 2018 19:38
Smooth Scrubbing Web Video FFMPEG Mega Command
ffmpeg -i input.mp4 -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 -an -vf "scale=-1:1440, reverse" -preset veryslow -g 2 output.mp4
// -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3
// Encode for web with a good balance of browser compatibility and compression ratio
// -an
// Strip audio tracks
// -vf "scale=-1:1440, reverse"
// Scale video to 1440px wide, maintaining aspect ratio
@waleedahmad
waleedahmad / downtime.py
Last active June 13, 2024 02:38
Python script to monitor your internet down time
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import csv
import sys
import time
import socket
import datetime
@nemotoo
nemotoo / .gitattributes
Last active June 20, 2024 09:44
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@DashW
DashW / ScreenRecorder.cs
Last active July 9, 2024 09:40
ScreenRecorder - High Performance Unity Video Capture Script
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading;
class BitmapEncoder
{
public static void WriteBitmap(Stream stream, int width, int height, byte[] imageData)
@cjddmut
cjddmut / EasingFunctions.cs
Last active July 16, 2024 08:20
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
*
* The MIT License (MIT)
*
* Copyright (c) 2019
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights