Skip to content

Instantly share code, notes, and snippets.

@omikun
omikun / autoSuspendUnity.py
Created March 2, 2018 07:09
Monitors current window under focus and suspends Unity when it is not in focus in order to save battery life
#!/usr/bin/ python
''' This script automatically finds PIDs for Unity
and suspend those processes whenever Unity is not in focus.
This script is meant to stay running and polls window focus every 1 second
Written March 1st, 2018 by Omikun, compiled from StackOverflow answers:
Identify window under focus:
https://superuser.com/questions/734007/how-do-i-tell-which-app-stole-my-focus-in-os-x
Get PID by process name
@omikun
omikun / csv2anki.txt
Last active March 28, 2018 18:48
Export csv to Anki flash cards
Open csv in Excel, save as Unicode Text
THEN format into CSV (use vi or something) by converting all tabs to comma
DO NOT save as CSV from excel, as this will turn korean characters into ??
Also DO NOT try saving as CSV directly from VS Code, it won't survive conversion to utf8
Make sure csv is indeed using commas as delimiters and not tabs or anything else
Convert file to utf8:
In powershell: Get-Content .\test.txt | Set-Content -Encoding utf8 test-utf8.txt
Add deck or make sure desired deck is selected in Anki, then import file and you're done!!
@omikun
omikun / gist:b91ca4e48a14e60f86f1c5d99899aa0c
Last active May 1, 2018 18:33
Course notes from Mr GoodBrush from Schoolism!
Lesson 1 light, shadow, half tones
Form - the deliniation between light and dark; get that right and you can use whatever colors for light/dark
Flatness/half tone - light/dark sides are better flat, all the interesting bits and information is in half tone. Don't put so much value details in light/dark!
Modeling bright means more contrast, when those contrast competes with light/dark, you lose the appearance of brightness in the light
Lighter objects pick up environment color very easily
shape matters the most, once you have shape right, value doesn't matter that much
if you have value right, color doesn't matter that much