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
| require 'pry' | |
| umgi_dir = "/Volumes/OS/interlaced" | |
| files = Dir.glob("#{umgi_dir}/**/*.mp4") | |
| files.each do |f| | |
| result = [f] | |
| ffmpeg_command = "ffmpeg -filter:v idet -frames:v 500 -an -f rawvideo -y /dev/null -i #{f} 2>&1 | awk -F 'detection: ' '/detection/ { print $2 }'" | |
| ffmpeg_result = `#{ffmpeg_command}` | |
| if ffmpeg_result | |
| result_lines = ffmpeg_result.split("\n") | |
| result_lines.each do |l| |
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
| // Url.js from https://github.com/Mikhus/jsurl | |
| function isiOS() { | |
| return navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false; | |
| } | |
| function isSafari() { | |
| var ua = navigator.userAgent.toLowerCase(); | |
| return (ua.indexOf('safari') !== -1) && ua.indexOf('chrome') === -1; | |
| } |
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
| "googleanalytics","google-analytics.com/ga.js" | |
| "quantcast",".quantserve.com/quant.js" | |
| "comscore","http://int.sitestat.com/comscore/" | |
| "omniture","<!-- SiteCatalyst" | |
| "facebook","<meta property=""fb:app_id"" conten" | |
| "chartbeat","static.chartbeat.com/js/chartbeat.js" | |
| "googleecom","google_conversion_id" | |
| "floodlight","https://fls.doubleclick.net/activityi" | |
| "nielsen","imrworldwide.com" | |
| "webtrends","dcsMultiTrack" |
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
| require 'cherti/all' | |
| include Cherti | |
| def create_ad_url_override(user_id, ad_url, lang='ad') | |
| device_types = ['mobile', 'tablet', 'pc'] | |
| device_types.each do |dt| | |
| AdUrl.find_or_create(:auth_provider => User[user_id].auth_provider, :device_type => dt, :lang => lang, :url => ad_url) | |
| end | |
| end |
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
| # folder content | |
| # -rw-r--r--@ 1 G staff 1275020804 3 Sep 10:55 package.box | |
| # vagrant box remove package # if needed remove all files from virtual box | |
| # vagrant setup | |
| vagrant box add package package.box | |
| vagrant init package | |
| vagrant up | |
| vagrant ssh |
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
| <% flash.each do |type, message| %> | |
| <div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
| <button class="close" data-dismiss="alert">×</button> | |
| <%= message %> | |
| </div> | |
| <% end %> |
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
| # Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
| bg: | |
| devise: | |
| confirmations: | |
| confirmed: "Вашият профил беше успешно потвърден. Влязохте успешно в него." | |
| send_instructions: "Ще получите писмо с инструкции как да потвърдите вашия профил до няколко минути." | |
| send_paranoid_instructions: "Ако вашият имейл адрес съществува в базата ни, ще получите там инструкции как да потвърдите вашия профил." | |
| failure: | |
| already_authenticated: "Вече сте влязъл в профила си." |
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
| require 'rblineprof' | |
| module Rblineprof | |
| module ConsoleHelpers | |
| include Rblineprof::Helpers | |
| def lineprof_block(options = {}, &block) | |
| profile = lineprof(rblineprof_profiler_regex(options[:lineprofiler])) do | |
| ret = yield | |
| end |
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
| require 'Benchmark' | |
| def balanced_delimiters?(text) | |
| openers = [] | |
| matchers = { | |
| ')' => '(', | |
| ']' => '[', | |
| '}' => '{' | |
| } | |
| text.chars.each do |char| |