Skip to content

Instantly share code, notes, and snippets.

@adrianotadao
adrianotadao / feeds.opml
Created December 16, 2021 00:27 — forked from stebennett/feeds.opml
The feeds I currently subscribe to.
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Stephen subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Companies" title="Companies">
<outline type="rss" text="Trello" title="Trello" xmlUrl="https://trello.engineering/feed.xml" htmlUrl="http://tech.trello.com/"/>
<outline type="rss" text="IMVU" title="IMVU" xmlUrl="http://engineering.imvu.com/feed/" htmlUrl="https://engineering.imvu.com"/>
  • create page
  • create a test for this page using the editor (...)
  • run this command
    page_id = "PAGE_ID"
    
    MongoPage.find(page_id).power_up.update(
      objective: MongoExperiment::ClickthroughObjective.new(url: 'https://getshogun.com')
    )
    

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@adrianotadao
adrianotadao / gist:f7e8aedf2508d9c3cc2da0a0b11065eb
Created December 13, 2017 02:21 — forked from christofluethi/gist:646ae60d797a46a706a5
Convert m4a to mp3 on OS X command line using ffmpeg
brew update
brew link yasm
brew link x264
brew link lame
brew link xvid
brew install ffmpeg
ffmpeg wiki:
https://trac.ffmpeg.org/wiki/Encode/MP3
@adrianotadao
adrianotadao / cursos.rb
Last active August 25, 2017 14:15
Cursos
# ------------------------------------
# ------------------------------------
# Cursos Obrigatórios
# ------------------------------------
# ------------------------------------
# [x] - Cursos obrigatorios antes de liberar outros (predescessor) - permite acesso, caso contrário mostra um cadeado e não deixa o cara continuar.
class Category
attr_accessor :predecessor_id
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>
SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
@adrianotadao
adrianotadao / send_email.rb
Last active December 16, 2016 18:10
Send Paperbot email
## To access the paperbot
cd paperbot/current
bundle exec rails c
## To select the team
team = Team.last
## To get the user
user = team.users.where(email: '[email protected]').first
# swap
sudo dd if=/dev/zero of=/mnt/swapfile bs=1M count=2048
sudo chown root:root /mnt/swapfile
sudo chmod 600 /mnt/swapfile
sudo mkswap /mnt/swapfile
sudo swapon /mnt/swapfile
# /etc/fstab
/mnt/swapfile swap swap defaults 0 0
sudo mount -a
@adrianotadao
adrianotadao / gpg-import-and-export-instructions.md
Created June 4, 2016 00:24 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

May 10, 2016 3:12:00 PM UTC
{'name': 'Rafael Sartori', 'text': "Hello team Skore! I am interest to use the platform to Course Catalog. I would like to learn more about SkorePro features and understand how it can help me. I'm founding a start up that will use online education as a tool to spread our content. I'd like to know about prices and how it's charged. I hope that together we can set up the best implementation strategy. Regards, Rafael Sartori.", 'phone': '19 99192-2858', 'type': 'goals', 'email': '[email protected]', 'option': 3}
May 8, 2016 8:47:09 PM UTC
{'name': 'Filipe Alves', 'text': u'Ol\xe1 time Skore! Tenho o interesse de utilizar a plataforma para Treinamento de pessoas. Gostaria de conhecer melhor as features do SkorePro para entender como podem me ajudar nesse objetivo. Aguardo o retorno de voc\xeas para juntos montarmos a melhor estrat\xe9gia de aplica\xe7\xe3o. Abra\xe7o, Filipe Alves.', 'phone': u'', 'type': 'goals', 'email': '[email protected]', 'option': 2}
May 8, 2016 8:46