Skip to content

Instantly share code, notes, and snippets.

Aleksey Ivanov ivanovaleksey

Block or report user

Report or block ivanovaleksey

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 Capfile.rb
load 'deploy'
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
load 'config/deploy' # remove this line to skip loading any of the default tasks
View xpath-cheatsheet.js
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// 0. XPath Examples.
// More:
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
View date_scopes.rb
module DateScopes
extend ActiveSupport::Concern
module ClassMethods
def define_date_scopes(*scope_columns) do |column|
match_data = column.match(/^(.*)_at$/)
name = match_data ? match_data[1] : column
View postgres aliases
# make_dump(){
# now=$(date +"%Y%m%d")
# pg_dump -Fc -U deployer -w mercury_production -f ~/manual_dumps/mercury_sa_$now.dump
# }
if [[ -z $1 ]]; then
echo Database is not specified
return 0
View sheety.rb
require 'axlsx'
require 'batch_factory'
def off_balance?(count)
!(count =~ /^0\d\d/).nil? || !(count =~ /^\D/).nil?
keys = [:code, :name, :sub1, :sub2, :sub3]
skk = BatchFactory.from_file('skk.xlsx', keys: keys).drop(1)
ivanovaleksey /
Created Mar 2, 2017 — forked from kevin-smets/
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)





ivanovaleksey / The Technical Interview Cheat
Created Mar 4, 2017 — forked from TSiege/The Technical Interview Cheat
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
View dry_markup.rb
require 'dry-struct'
module Types
include Dry::Types.module
class Button < Dry::Struct
attribute :text, Types::String
ivanovaleksey /
Created Dec 7, 2017
FFmpeg: RTP - MP4
ffmpeg \
-protocol_whitelist file,udp,rtp -i sdp.test \
-c:v libx264 -c:a aac \
-y test.mp4
# ffmpeg \
# -protocol_whitelist file,rtp,udp -i sdp.test \
ivanovaleksey /
Created Dec 14, 2017
Describe videoroom plugin flow
  1. OUT: Join
{request: "join", room: 1234, ptype: "publisher", display: "a"}

Создается participant (с типом publisher) и добавляется в комнату.

g_hash_table_insert(videoroom->participants, janus_uint64_dup(publisher->user_id), publisher);
You can’t perform that action at this time.