Skip to content

Instantly share code, notes, and snippets.

Shinichi Okamoto okamos

Block or report user

Report or block okamos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bubble-sort.go
package main
import (
func main() {
View config.yml
version: 2
workspace_root: &workspace
working_directory: /go/src/
## sound
ffmpeg -y -i input.mp4 -f mp4 -acodec libfdk_aac -ar 44100 -b:a 64k -ac 2 -profile:a aac_he -afterburner 1 -vn output.m4a
## mp4 video
ffmpeg -y -i input.mp4 -f mp4 -vcodec libx264 -acodec libfdk_aac -s 1280x720 -b:v 3000k -r 29.97 -pix_fmt yuv420p -b:a 128k -ar 44100 -ac 2 -aspect 1280:720 output.mp4
## sprite animation webp / jpg
ffmpeg -loglevel verbose -i input.mp4 -s 400x400 -r 12 -crf 0 -b:v 100000k -an -f mpegts - 2>"ffmpeglog" |\
ffmpeg -i - -vcodec libwebp -vf tile=4x7 -qscale:v 60 "out/%05d.webp" 2>/dev/null
View monthly_imp_and_play.rb
_pry_.config.print = proc {}
campaigns = Campaign.includes(:customer).all = 'Asia/Tokyo'
start_at = ( - 1.month).beginning_of_month
end_at = ( - 1.month).end_of_month
campaign_data = do |cam|
imp_value = ReportBase.where(delivery_id:, report_id: 1, report_at: start_at..end_at).sum(:value) || 0
play_value = ReportBase.where(delivery_id:, report_id: 101, report_at: start_at..end_at).sum(:value) || 0
{ customer_name: cam.customer.customer_name, name:, imp: imp_value, play: play_value }
You can’t perform that action at this time.