Skip to content

Instantly share code, notes, and snippets.

@Marasca
Marasca / README.md
Created February 26, 2021 01:12 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8

Instala o docker

curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh

Instala o docker-compose

@Marasca
Marasca / git-automated-deploys.md
Created January 20, 2018 14:02 — forked from gabrielgilini/git-automated-deploys.md
Deploys automatizados com git
#!/bin/sh
function get_project_path()
{
echo $(pwd | sed 's/\/home\/git\/repositories\///' | sed 's/\.git$//')
}
branch=$(git rev-parse --symbolic --abbrev-ref $1)
if [ $branch == "hml" ]
then
@Marasca
Marasca / longPolling.js
Created January 6, 2018 01:43 — forked from jasdeepkhalsa/longPolling.js
Simple Long Polling Example with JavaScript and jQuery by Tian Davis (@tiandavis) from Techoctave.com (http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery)
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast)
(function poll(){
$.ajax({ url: "server", success: function(data){
//Update your dashboard gauge
salesGauge.setValue(data.value);
}, dataType: "json", complete: poll, timeout: 30000 });
})();
server {
listen 80;
server_name CHANGEME.app;
root /var/www/vhosts/CHANGEME.app/public;
index index.html index.htm index.php;
charset utf-8;
location / {
# v2 sintax
version: '2'
# Named volumes
volumes:
# MySQL Data
l5dbeka-mysql-data:
driver: local
# Postgres Data
@Marasca
Marasca / config.txt
Created August 16, 2017 01:09 — forked from diegomengarda/config.txt
Configuration for Ubuntu to run Laravel
Start Server Laravel
*Update repositories
sudo apt-get update
*Locale Config
locale-gen en_US en_US.UTF-8 pt_BR.UTF-8
*Install Mysql
sudo apt-get install -y mysql-server
@Marasca
Marasca / post-receive
Created August 6, 2017 15:41 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then