This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# gif_to_mp4_5x.sh | |
# Convert GIF to 5x speed MP4 using ffmpeg. | |
INPUT="$1" | |
BASENAME=$(basename "$INPUT" .gif) | |
SPEED=1 | |
PTS=$(awk "BEGIN{print 1/$SPEED}") | |
WIDTH=1000 # Desired output width (px) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# make_gif_5x.sh | |
# Convert a .mov file into an optimized 5x speed animated GIF using ffmpeg and palette method. | |
# Usage: | |
# ./make_gif_5x.sh input.mov | |
INPUT="$1" | |
BASENAME=$(basename "$INPUT" .mov) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ffmpeg commend for generating gif | |
brew install ffmpeg imagemagick | |
ffmpeg -i input.mov -vf scale=1000:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 5 -loop 0 - output.gif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load Homebrew environment variables | |
export HOMEBREW_NO_INSTALL_CLEANUP=1 | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
export GREP_OPTIONS='--color=auto' | |
# Optimize History Behavior | |
setopt HIST_IGNORE_ALL_DUPS # Ignore duplicates in history | |
setopt HIST_SAVE_NO_DUPS # Do not write duplicate commands to history | |
setopt HIST_REDUCE_BLANKS # Remove unnecessary spaces in commands |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is my personal setting | |
#Github | |
Host github.com | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_rsa | |
#<CompanyName> | |
Host <CompanyName> | |
HostName bitbucket.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
export HISTSIZE=10000 | |
export PS1="\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ " | |
# PATH | |
export PATH=/Users/kkwon/Library/Python/2.7/bin:$PATH | |
export PATH="~/Downloads/applications/Sublime Text.app/Contents/SharedSupport/bin":$PATH | |
export PATH="~/Downloads/applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin":$PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np; | |
ROW_COUNT = 5 | |
COL_COUNT = 5 | |
BOMES_COUNT = (ROW_COUNT * COL_COUNT) / 4 | |
def create_board(): | |
""" | |
create a board | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Write a function to return True or False if the target value is in the 2d array. | |
data = [ | |
[1, 3, 5, 7, 9, 10], | |
[3, 4, 6, 9, 10, 13], | |
[6, 8, 10, 12, 14, 16], | |
[10, 12, 14, 16, 18, 20], | |
[22, 23, 24, 25, 26, 27] | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function minimumMovement(obstacleLanes) { | |
// Write your code here | |
// console.log(obstacleLanes) | |
let currentLine = 2; | |
let total_move = 0; | |
var len = obstacleLanes.length; | |
var i = 0 | |
for (i = 0; i < len; i++) { | |
let element = obstacleLanes[i] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# initialization file (not found) |
NewerOlder