Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dx7 on github.
  • I am dx7 (https://keybase.io/dx7) on keybase.
  • I have a public key whose fingerprint is 35FE C788 27E0 0669 564A 6228 85FE F453 4D62 6DC2

To claim this, I am signing this object:

puts "Hello from Gist"
require 'formula'
class Ffmpeg < Formula
homepage 'http://ffmpeg.org/'
url 'http://ffmpeg.org/releases/ffmpeg-2.0.1.tar.bz2'
sha1 'cc36c696228221ce14585edd90fb6413d206a5c8'
head 'git://git.videolan.org/ffmpeg.git'
option "without-x264", "Disable H.264 encoder"
@dx7
dx7 / gist:5623348
Created May 21, 2013 21:20
Smooth Streaming manifest generated by USP from edited ISM with just one audio track. It works fine.
<?xml version="1.0" encoding="utf-8"?>
<!--Created with Unified Streaming Platform(version=1.4.57)-->
<SmoothStreamingMedia
MajorVersion="2"
MinorVersion="0"
TimeScale="10000000"
Duration="3022933333">
<StreamIndex
Type="audio"
QualityLevels="1"
@dx7
dx7 / gist:5623339
Created May 21, 2013 21:19
ISM file edited. It has just one audio track.
<?xml version="1.0" encoding="utf-8"?>
<!--Created with Unified Streaming Platform(version=1.4.57)-->
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
<head>
<meta name="clientManifestRelativePath" content="10004284.ismc" />
<meta name="creator" content="Unified Streaming Platform (USP)" />
<meta name="lookahead_fragments" content="2" />
<meta name="dvr_window_length" content="30" />
<meta name="archive_segment_length" content="0" />
<meta name="archiving" content="false" />
@dx7
dx7 / gist:5623321
Created May 21, 2013 21:16
Smooth Streaming manifest generated by USP with 4 video files. It doesn't play.
<?xml version="1.0" encoding="utf-8"?>
<!--Created with Unified Streaming Platform(version=1.4.57)-->
<SmoothStreamingMedia
MajorVersion="2"
MinorVersion="0"
TimeScale="10000000"
Duration="3023146666">
<StreamIndex
Type="audio"
QualityLevels="3"
@dx7
dx7 / gist:5623317
Created May 21, 2013 21:15
ISM file generated by USP with 4 video files.
<?xml version="1.0" encoding="utf-8"?>
<!--Created with Unified Streaming Platform(version=1.4.57)-->
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
<head>
<meta name="clientManifestRelativePath" content="10004284.ismc" />
<meta name="creator" content="Unified Streaming Platform (USP)" />
<meta name="lookahead_fragments" content="2" />
<meta name="dvr_window_length" content="30" />
<meta name="archive_segment_length" content="0" />
<meta name="archiving" content="false" />
activerecord:
models:
contato:
zero: contatos
one: contato
other: contatos
# ...
@dx7
dx7 / gist:5297012
Last active December 15, 2015 17:29
Adiciona -*- coding: utf-8 -*- em todos os arquivos .rb e .rake
Remove comentários antigos
find . -iname "*.rb" -print0 -o -iname "*.rake" -print0 | xargs -0 -I {} sed -i "" -E -e "/^#.*coding.*utf-8.*$/d" {}
Adiciona novo magic encoding comment
find . -iname "*.rb" -print0 -o -iname "*.rake" -print0 | xargs -0 -I {} gsed -i '1i# -*- coding: utf-8 -*-' {}
@dx7
dx7 / gist:5119553
Last active December 14, 2015 16:59
Busca e troca sua senha e token em todo o histórico do repositório git. Útil quando vc faz commit com dados sensíveis e precisa abrir o repositório.
git filter-branch -f --tree-filter "find . -type f -exec sed -e s/your-plain-password/some-string/ -e s/\'your-plain-token\'/ENV[\'ENVIRONMENT_VARIABLE_TOKEN\']/ -i '' {} \;"