This file contains 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
select | |
a.subscription_invitee_credit_minutes, | |
mm.messager_campaign_category, | |
mm.messager_campaign_name, | |
count(distinct a.user_id) as n_users | |
from analytics.acquisition_credit_card_source_tracking a | |
join analytics.messager_message_results mm | |
on mm.user_id = a.user_id | |
-- email sent before card added | |
and mm.messager_message_created_at < a.credit_card_added_user_event_at |
This file contains 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
select | |
a.subscription_created_at::date, | |
b.cleaned_source, | |
b.utm_campaign, | |
count(distinct b.browser_hash) as n_visits, | |
count(distinct case when w.first_user_created_event_at is not null then b.user_id else null end) as accounts_created, | |
count(distinct a.user_id) as credit_cards_added | |
from analytics.browser_hash_hits b | |
join analytics.acquisition_waterfall_by_browser_hash w | |
on w.browser_hash = b.browser_hash |
This file contains 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
with most_recent_subscription as ( | |
select | |
user_id, | |
max(created_at) as created_at | |
from subscriptions s | |
group by 1 | |
), | |
weekly_minutes as ( | |
select | |
date_trunc('month', subscription_started_at) as sub_start_month, |
This file contains 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
--waitlist | |
select | |
distinct | |
us.name, | |
us.email, | |
c.code as pricing_plan, | |
c.amount, | |
u.created_at::date as entered_credit_card_at | |
from user_events u | |
join coupons c |
This file contains 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
with most_recent_subscription as ( | |
select | |
user_id, | |
max(id) as subscription_id | |
from alooma.subscriptions | |
group by 1 | |
), | |
weekly_minutes as ( | |
select | |
a.user_id, |
This file contains 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
pyenv virtualenv 2.7.10 my-virtual-env-2.7.10 | |
Need to run - pyenv install 3.6.5 if the python version is not installed |
This file contains 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
ls -F |grep -v / | wc -l |
This file contains 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
sudo du -hsx /* | sort -rh | head -n 40 |
This file contains 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
# create | |
python -m venv . | |
# activate | |
source /bin/activate |
This file contains 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
.git/hooks/pre-push | |
^new file | |
chmod +x pre-push | |
#!/bin/bash | |
protected_branch='master' | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') |