Skip to content

Instantly share code, notes, and snippets.

View ozydingo's full-sized avatar

Andrew H Schwartz ozydingo

View GitHub Profile
@tomhicks
tomhicks / plink-plonk.js
Last active November 12, 2024 19:08
Listen to your web pages
@ProGM
ProGM / arel_cheatsheet_on_steroids.md
Last active November 12, 2024 21:47
Arel cheatsheet on Steroids

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias

@mikoim
mikoim / README.md
Last active November 14, 2024 02:07
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

--
Introduction:
This coding challenge is designed for you to show off your skills to the 3Play Media Developer team. You
should have the following challenge completed by the time you come in for your in-person interview so we
can take a look at it together. While all of the basic requirements of this project should be met, you're
encouraged to make this project your own and implement any additional features that you see fit.
Feel free to ask whatever questions, use whatever resources and provide whatever documentation
you'd like during the completion of this project.
@phette23
phette23 / current-dir-in-iterm-tab-title.sh
Last active August 3, 2024 16:51
Set the iTerm tab title to the current directory, not full path.
# put this in your .bash_profile
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND";
fi
# Piece-by-Piece Explanation:
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too
# the $PROMPT_COMMAND environment variable is executed every time a command is run
# see: ss64.com/bash/syntax-prompt.html