Skip to content

Instantly share code, notes, and snippets.

@vpilot
vpilot / ffmpeg.md
Created September 11, 2023 09:40 — forked from liangfu/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@vpilot
vpilot / adduser.sh
Last active July 5, 2023 10:30
Create deploment user without login and password
#!/bin/bash
# Create deploy user without login and password
# You may want to add this user to an existing group
# e.g.: usermod -a -G deploy www-data
adduser --disabled-login --shell /bin/bash --gecos "Deploy User" deploy
@vpilot
vpilot / README.md
Created February 6, 2018 21:23 — forked from bsodmike/README.md
OC Nvidia GTX1070s in Ubuntu 16.04LTS for Ethereum mining

Following mining and findings performed on EVGA GeForce GTX 1070 SC GAMING Black Edition Graphics Card cards.

First run nvidia-xconfig --enable-all-gpus then set about editing the xorg.conf file to correctly set the Coolbits option.

# /etc/X11/xorg.conf
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
@vpilot
vpilot / fix-homebrew-npm.md
Created January 19, 2016 13:49 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:

$ npm update npm -g
@vpilot
vpilot / README.md
Created December 30, 2015 14:27 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@vpilot
vpilot / mcrypt installation
Last active August 29, 2015 14:20
Installing mcrypt on OS X 10.10
Pre-requisit is to have homebrew installed.
1. brew install mcrypt
2. brew install autoconf
3. brew tap homebrew/dupes
4. brew tap homebrew/versions
5. brew tap homebrew/homebrew-php
6. brew install php55
7. brew install php55-mcrypt --without-homebrew-php
8. At last edit /ect/php.ini and add extension path to mcrypt.so, something like:
@vpilot
vpilot / phpMyAdmin on Mac
Last active August 29, 2015 14:20
Installing phpMyAdmin on Mac
1. Download the latest phpMyAdmin distribution
phpMyAdmin-x.x.x-english.tar.gz
2. Create folder ~/Sites/database/ and move distribution into the folder
mv ~/Downloads/phpMyAdmin-x.x.x-english.tar.gz ~/Sites/database/
2. Untar and make files executable
# Apache configuration
AddType application/font-woff .woff
AddType application/font-woff2 .woff2
AddType application/font-sfnt .ttf .otf
AddType image/svg+xml .svg
AddType application/vnd.ms-fontobject .eot
@vpilot
vpilot / PEAR and PECL installation
Last active August 29, 2015 14:12
Enable PEAR and PECL on Yosemite
// By default PEAR is not installed on Yosemite, but it comes with installation phar file
$ cd /usr/lib/php
$ sudo php install-pear-nozlib.phar
// If you don't have php.ini file use default one provided
$ sudo cp /etc/php.ini.default /etc/php.ini
// edit php.ini with your editor of choice and add two following lines
// make sure to douple check your extension path, it maybe different
include_path = ".:/usr/lib/php/pear"
#Store screenshots in subfolder on desktop
mkdir ~/Desktop/Screenshots
defaults write com.apple.screencapture location ~/Desktop/Screenshots
#Show the ~/Library folder
chflags nohidden ~/Library