Skip to content

Instantly share code, notes, and snippets.

defmodule Olivetree.ReleaseTasks do
@start_apps [
:crypto,
:ssl,
:postgrex,
:ecto
]
def olivetree, do: Application.get_application(__MODULE__)
// setup sharing button and UIActivityViewController
// once the download finishes
downloadingViewModel.fileDownloadCompleteEvent.asObservable()
.observeOn(MainScheduler.instance)
.subscribe({ download in
self.fullDownloadButton.rx.tap
.bind {
// copy file to temp dir to rename it
if let localDownload = self.downloadingViewModel.fileDownload.value {
let activityViewController = UIActivityViewController(activityItems: [UIImage(named: "FWBCLogo")!, "Shared via the Faithful Word App: https://faithfulwordapp.com/", localDownload.localUrl], applicationActivities: nil)
$info: darken(#328cc1, 20%);
$primary: #083c5d;
$primary-light: #328cc1;
$navbar_color: #083c5d;
@mazz
mazz / README.md
Created September 21, 2018 13:04 — forked from Luzifer/README.md
Running docker-compose as a systemd service

Running docker-compose as a systemd service

Files

File Purpose
/etc/compose/docker-compose.yml Compose file describing what to deploy
/etc/systemd/system/docker-compose.service Service unit to start and manage docker compose
/etc/systemd/system/docker-compose-reload.service Executing unit to trigger reload on docker-compose.service
/etc/systemd/system/docker-compose-reload.timer Timer unit to plan the reloads
defmodule Olivetree.ReleaseTasks do
@start_apps [
:crypto,
:ssl,
:postgrex,
:ecto
]
def olivetree, do: Application.get_application(__MODULE__)
@mazz
mazz / stream_to_youtube.sh
Created September 9, 2018 22:37 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
#!/usr/bin/env python
# encoding=utf8
from __future__ import print_function
import json
import time
import datetime
import argparse
import sys
reload(sys)
@mazz
mazz / encode.sh
Created August 27, 2018 01:22 — forked from mikoim/README.md
YouTube recommended encoding settings on ffmpeg (+ libx264)
#/bin/sh
ffmpeg -i input -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low output
@mazz
mazz / gist:903b39e727fbc46cc1180f6274c622e9
Created July 19, 2018 20:05
install tensorflow into a python venv
<download python3 package from python.org and install with package installer>
cd src; mkdir tensorflow; python3 -m venv tf-test; cd tf-test
source bin/activate
curl https://bootstrap.pypa.io/get-pip.py | python
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org grpcio==1.9.1
~/webapp/phx/1.4.0-dev/dynt (master ✔) ᐅ docker-compose up
dynt-db is up-to-date
Starting dynt-admin ... done
dynt-server is up-to-date
Attaching to dynt-db, dynt-admin, dynt-server
dynt-db | The files belonging to this database system will be owned by user "postgres".
dynt-db | This user must also own the server process.
dynt-db |
dynt-db | The database cluster will be initialized with locale "en_US.utf8".
dynt-db | The default database encoding has accordingly been set to "UTF8".