Skip to content

Instantly share code, notes, and snippets.

View thefron's full-sized avatar
๐Ÿ“•

Hoseong Liam Hwang thefron

๐Ÿ“•
View GitHub Profile
class MyCustomCell < UITableViewCell
# This method is used by ProMotion to instantiate cells.
def initWithStyle(style_name, reuseIdentifier: reuseIdentifier)
super
stylish
self
end
# A delegate method when the user clicks the Row(it's blue by default)
@ttseng
ttseng / ffmpeg-ffmpegthumbnailer-heroku.md
Last active April 17, 2019 02:50 — forked from coopermaruyama/vendor-ffmpeg-heroku
install ffmpeg and ffmpegthumbnailer to your heroku app to use with carrierwave-video and carrierwave-video-thumbnailer

Preface

Below are the steps I took to install ffmpeg, ffmpegthumbnailer, and heroku to use with carrierwave-video and carrierwave-video-thumbnailer gems on my heroku app. I found there was no documentation to do exactly this, so I hope this is helpful for other people (and will save them the countless hours it took me to finally get it to work)

These are the libraries you will end up installing to get all of this to work.

  • x264
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Example aliases
@gcarrion-gfrmedia
gcarrion-gfrmedia / 0000_packages.config
Created April 29, 2014 10:49
AWS Elastic Beanstalk Ruby 2.0/Puma Environment - .ebextensions tweaks and Sidekiq configuration. This is known to work fine with AWS Elastic Beanstalk 's 64bit Amazon Linux 2014.03 v1.0.1 running Ruby 2.0 (Puma) stack. Later stack versions might not work, but for that specific version works fine.
# Install Git needed for Git based gems
packages:
yum:
git: []
@9beach
9beach / ๊ธฐ์ˆ  ๋ฌธ์„œ๋ฅผ ์“ธ ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ๋ช‡ ๊ฐ€์ง€.md
Last active November 16, 2024 06:51
๊ธฐ์ˆ  ๋ฌธ์„œ๋ฅผ ์“ธ ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ๋ช‡ ๊ฐ€์ง€๋ฅผ ๋‚˜์—ดํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ์ˆ  ๋ฌธ์„œ๋ฅผ ์“ธ ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ๋ช‡ ๊ฐ€์ง€

๋…์ž ๋ฐฐ๋ ค

์ž์‹ ์˜ ์ƒ๊ฐ๊ณผ ํ•  ์ผ์„ ์ •๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ๊ธฐ์ˆ  ๋ฌธ์„œ์˜ ๋ชฉํ‘œ๊ฐ€ ๋  ์ˆ˜๋Š” ์—†๋‹ค. ๋จผ์ € ๋…์ž๋ฅผ ์‹๋ณ„ํ•˜๋ผ. ๊ทธ๋ฆฌ๊ณ  ๋…์ž๋ฅผ ๋ฐฐ๋ คํ•˜๊ณ  ๋…์ž ์ž…์žฅ์„ ์ƒ๊ฐํ•˜๋ฉฐ ๋ฌธ์„œ๋ฅผ ์ž‘์„ฑํ•˜๋ผ.

ํ…์ŠคํŠธ ํŒŒ์ผ์˜ ์žฅ์ 

์ค‘์š”ํ•œ ์ •๋ณด๋ฅผ ์œ„ํ‚ค๋‚˜ ๊นƒ(Git)์—์„œ ํ…์ŠคํŠธ๋กœ ์ž‘์„ฑํ•˜์ง€ ์•Š๊ณ , ์›Œ๋“œ๋‚˜ ํŒŒ์›Œํฌ์ธํŠธ ๊ฐ™์€ ์ด์ง„ ๋ฌธ์„œ๋กœ ์ž‘์„ฑํ•  ๋•Œ๋งˆ๋‹ค ๋‹น์‹ ์˜ ๋™๋ฃŒ๋Š” ์ ‘๊ทผ์„ฑ, ๊ฐ€์‹œ์„ฑ, ๋ฒ„์ „ ๊ด€๋ฆฌ ๋“ฑ ๋‹ค์–‘ํ•œ ๋ฌธ์ œ๋กœ ๊ณ ์ƒํ•  ๊ฒƒ์ด๋‹ค.

@four43
four43 / install-redis.sh
Last active January 4, 2025 19:18 — forked from dstroot/install-redis.sh
Install Redis
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://gist.githubusercontent.com/four43/e00d01ca084c5972f229/raw/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
@msoap
msoap / script.go
Last active October 8, 2022 17:23
Run Go program as script
//usr/bin/env go run $0 "$@"; exit
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println("Hello world!")
@thomasst
thomasst / migrate-redis.py
Created May 14, 2015 18:26
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.
@selaromi
selaromi / rails-postgres-wercker-database_url.md
Last active June 26, 2017 08:27
wercker.yml for Rails with Postgresql and DATABASE_URL (docker stack)

RAILS & POSTGRES WITH WERCKER AND DATABASE_URL

Basically, if you prefer to use DATABASE_URL in your application better than creating the whole database.yml thing, set the following ENV variable in your wercker app settings:

  • APP_POSTGRES_PASSWORD (required)
  • APP_POSTGRES_USER (optional)
  • APP_POSTGRES_DB (optional)
  • DATABASE_URL (value below)

name: DATABASE_URL

@schickling
schickling / _README.md
Last active January 4, 2024 09:37
Script to import and export docker-machine configurations to sync between hosts/collaborators

docker-machine import/export

Script to import and export docker-machine configurations to sync between hosts/collaborators

Export (on host A)

$ docker-machine ls
NAME       ACTIVE   DRIVER         STATE     URL                            SWARM   DOCKER    ERRORS
dev        -        digitalocean   Running   tcp://example.com:2376                 v1.10.1