Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
This guide shows you common practices to convert IPv4- and IPv6-Addresses into their binary representation.
This guide has been written by Matthias Kaschubowski, a autodidactical software developer from germany with about 14 years of practice converting coffee to code. He works in his free time as a php evangelist on a lot of platforms ( last shown as tr0y on php.de, a german PHP related forum and as himself as an adminstrator at the largest PHP-related facebook group ).
| server { | |
| listen 80 default_server; | |
| server_name example.com www.example.com; | |
| access_log /srv/www/example.com/logs/access.log; | |
| error_log /srv/www/example.com/logs/error.log; | |
| root /srv/www/example.com/public; | |
| index index.php index.html; |
| #!/bin/bash | |
| # Are you using Mac OS X? | |
| # You need to install coreutils for this to work. | |
| # try `brew install coreutils` | |
| # or `sudo port install coreutils` | |
| # set a part size that works with FAT32 drives | |
| PART_SIZE=3999 | |
| # nice little intro |
| FILE SPACING: | |
| # double space a file | |
| sed G | |
| # double space a file which already has blank lines in it. Output file | |
| # should contain no more than one blank line between lines of text. | |
| sed '/^$/d;G' |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}'
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
| set :rbenv, '"$HOME/.rbenv/shims":"$HOME/.rbenv/bin"' | |
| job_type :rake, 'cd :path && PATH=:rbenv:"$PATH" :environment_variable=:environment bundle exec rake :task --silent :output' | |
| job_type :runner, 'cd :path && PATH=:rbenv:"$PATH" bin/rails runner -e :environment ":task" :output' | |
| set :output, 'log/whenever.log' |
At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.
git commit --amendThis will open your $EDITOR and let you change the message. Continue with your usual git push origin master.
Sidekiq jobs can be enqueued or scheduled. Enqueued means that they are gonna be picked up as soon as possible, scheduled jobs will be enqueued at some specific time.
When using ActiveJobs, Rails will return a job_id after sending the job to ActiveJobs
job = UserMailer.send_invite(params).deliver_later
| ## Useful Commands | |
| Get kubectl version | |
| kubectl version | |
| Get cluster info: |