Skip to content

Instantly share code, notes, and snippets.

Jahyun Oh soharu

  • Seoul, Korea
View GitHub Profile
@soharu
soharu / config.js
Created Aug 21, 2018 — forked from alldne/config.js
Resizing icon (iOS)
View config.js
// npm install -g mobile-icon-resizer
// https://github.com/muzzley/mobile-icon-resizer
// mobile-icon-resizer -i icon1024.png --platforms ios --config config.js --iosof ios
function make(width, scale) {
var name = width + "";
var filename;
if (scale === 1) {
filename = "-" + name + ".png";
@soharu
soharu / OSX-Convert-MOV-GIF.md
Created Feb 26, 2018 — forked from tskaggs/OSX-Convert-MOV-GIF.md
Creating GIFs from .MOV files in OSX using FFmpeg and ImageMagick
View OSX-Convert-MOV-GIF.md

Convert MOV to GIF using FFmpeg and ImageMagick

I tried a few different techniques to make a GIF via command-line and the following gives me the best control of quality and size. Once you're all setup, you'll be pumping out GIFs in no time!

Preparation

Install FFmpeg

  • $ brew install ffmpeg [all your options]
    • Example: $ brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools

Install ImageMagick

@soharu
soharu / process_py_image_filter.pyde
Last active Apr 18, 2017
Red filter in Processing.py
View process_py_image_filter.pyde
WIDTH = 360
HEIGHT = 240
def setup():
global img
img = None
noLoop()
size(WIDTH, HEIGHT)
frame.setResizable(True)
background(200)
@soharu
soharu / .bash_profile
Last active Feb 22, 2017
Bash setting for git
View .bash_profile
# Autocomplete Git Commands and Branch Names in Bash
#
# Download .git-completion.bash script
# curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
#
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
# Git branch in prompt.
@soharu
soharu / ipsc-submit.py
Last active Jul 11, 2017
IPSC submit script
View ipsc-submit.py
#!/usr/bin/env python
# required requests and beautifulsoup4
# pip install requests
# pip install beautifulsoup4
import os
import sys
import re
import pickle
View gist:3d8abd49e217076aa343
#!/usr/bin/env python
import unittest
import os
import sys
r, s, m = 43, 22, 2**32
X = []
def setup(xs):
View gist:056af91c11a876ad9b31
var input = [],
s2n = function (s) { return parseInt(s, 10) },
solve = function (r, c, candy_box) {
var result = 0;
for (var i = 0; i < r; i += 1) {
for (var j = 0; j < c; j += 1) {
if (candy_box[i][j] !== 'o')
continue;
if (j > 0 && j < c - 1 && candy_box[i][j - 1] === '>' && candy_box[i][j + 1] === '<') {
result += 1;
@soharu
soharu / gist:9760239
Created Mar 25, 2014
TAOCP 1.3.2 Exercise 5: silly
View gist:9760239
LOC #100
Main GETA $255,Silly
TRAP 0,Fputs,StdOut
TRAP 0,Halt,0
Silly BYTE 3+"pills"+6 % 3+'p','i','l','l','s'+6
@soharu
soharu / gist:9740439
Created Mar 24, 2014
Print table of 500 primes
View gist:9740439
% Algorithm P: Print table of 500 primes
L IS 500 % The number of primes to find
t IS $255 % Temporary storage
n GREG 0 % Prime candidate
q GREG 0 % Quotient
r GREG 0 % Remainder
jj GREG 0 % Index for PRIME[j]
kk GREG 0 % Index for PRIME[k]
pk GREG 0 % Value of PRIME[k]
mm IS kk % Index for output lines
You can’t perform that action at this time.