Skip to content

Instantly share code, notes, and snippets.

@reiro
reiro / porsche_discussion.md
Last active August 20, 2020 08:53
discussion

DYNAMIC VIDEO

  1. "Actually, maybe the easiest way is to create different variant for different video version. either the video will stitch in real time or we can pre-setup the video.. cos I think different variants will not be much."

What format it will be? Some custom new format (created using custom templates?). Or it will be our single video ad, like http://app.enzymic.co/previews/7Rvag9wL3qnQlmjD Can modify it (add an option) to support video playlists (sequence). Video clips selected will play one after another in the player.

  1. "Maybe how we can do it. A new ad unit type call video sequence. video sequence.. can create multiple variants, each variant is a video clip. user will define the sequence of each variant at advance tab, as well as macro value (line item id, or weather etc).. so we can have a scenario, sunny will serve a video clip, snow will serve another.
# first case
def get_data(endpoint = '/match')
headers = { 'Content-Type' => 'application/json' }
auth = { username: RADAR_CONFIG['username'], password: RADAR_CONFIG['password'] }
raise Net::ReadTimeout if @retries < 2
self.class.get(endpoint, headers: headers, basic_auth: auth, query: { url: @site_url })
end
# second case
def perform
https://tools.ietf.org/html/draft-west-cookie-incrementalism-00
"4.3. Tracking
The proposals in this document do not in themselves mitigate the
privacy risks described in Section 7.1 of [RFC6265bis]. Entities who
wish to use cookies to track user activity from cross-site contexts
can continue to do so by setting cookies that declare themselves as
"SameSite=None".
https://web.dev/samesite-cookies-explained
"Additionally in Chrome, if you also enable the cookies-without-same-site-must-be-secure flag then you must also specify
@reiro
reiro / gist:3b5f374d39fa5a065814a1dab78dc32f
Created May 27, 2019 15:35
smart tags click behavior
"Smart tag able to track click behaviour. Scenario will be ""Add to cart"" for ecommerce.
1. Scenario 1: for this site https://www.income.com.sg/truecare. user can click on answer to the questions.
And we should able to track the click event.
And when we setup ads that link to this smart tag, we can select which click events, so the ads will be show.
2. When user add to cart, Smart tag able to track the ""add to cart event and capture the product information."
# static views/smart_tags/show.js.erb
# now the script add event listener on load of the page
# when the page is rady it calls ready(fn)
# after document fully loaded we call fn(document);
@reiro
reiro / ap.conf r&h
Created November 13, 2017 12:13
ap.conf r&h
<VirtualHost *:81>
ServerName rhlive.cavwebservices.com
ServerAlias rhlivec.cavwebservices.com
ServerAlias rhbeta.cavwebservices.com
ServerAlias rhnarooma.com.au
ServerAlias www.rhnarooma.com.au
ServerAlias www.manlymanor.com.au
ServerAlias manlymanor.com.au
# Other domains that should get rewritten to the domain above
@reiro
reiro / gist:82f0c23b1f7e9939cb1e
Last active September 29, 2015 15:15
Deploy with capistrana
cap production deploy - деплой на сервер
sudo service supervisor restart
cap production deploy:rollback - откат сервера
ssh -i ~/.ssh/trendy.pem [email protected] - зайти под ubuntu
ssh [email protected] - зайти под деплоем
git checkout upstream/master
@reiro
reiro / gist:b5fd4223fb8c0d9cb3a7
Created June 12, 2015 09:34
start php service
php -S localhost:8090
http://localhost:8090/index.php?id=public-artist-event
http://localhost:8090/list.php - все
@reiro
reiro / gist:0adcda3c835589d9a2c5
Last active April 21, 2018 11:59
git работа
Изменить последний коммит:
1) git add .
2) git commit --amend
3) git push origin [name] -f
Если возникли конфликты при пул рквесте:
1) на девелоп
2) пулл с апстрима
3) на рабочую ветку
4) git mergetool -y - удаляем старую строку
@reiro
reiro / gist:198408a866ee4edb90a6
Last active August 29, 2015 14:22
Настройка trendy-reggae
https://bitbucket.org/ikantam/trendy-reggae/overview
rvm install 2.1
bash --login
rvm use 2.1.5 --default
https://rvm.io/integration/gnome-terminal
https://rvm.io/rvm/basics