720p -> H.264 (x264) video + AAC 128kbps audio:
ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -sameq -acodec libfaac -ab 128k -ar 44100 -ac 2 -s 1280x720 -vpre normal -b 1M output.mp4
#!/bin/bash | |
# Git | |
sudo apt-get -y install git | |
# Node.js | |
sudo apt-get -y install nodejs | |
sudo apt-get -y install npm | |
sudo ln -s /usr/bin/nodejs /usr/bin/node |
<?php | |
// captcha class by noidsit | |
// generate captcha uppercase alphanumeric | |
// if you want to use upper/lower case alphanumeric add lower case alphabet | |
// usage string = new Captcha(16,230,32,6); //fontwidth, image witdh, image height, how many characters | |
// string->captgen(); to generate captcha | |
class Captcha { | |
private $fontwidth; | |
private $width; | |
private $height; |
<?php // Namespace DB; | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
class Connection { | |
public function __construct() | |
{ | |
$this->capsule = new Capsule; | |
// Same as database configuration file of Laravel. |
# overwrite master with contents of seotweaks branch (seotweaks > master) | |
git checkout seotweaks # source name | |
git merge -s ours master # target name | |
git checkout master # target name | |
git merge seotweaks # source name |
#!/usr/bin/env bash | |
# Upgrade an Amazon Linux PHP 7.0 EC2 to PHP 7.1 | |
# | |
# Must be ran as sudo: | |
# sudo bash upgrade-php71.sh | |
# | |
# Can be added to ./.ebextensions/20_php.config like so: | |
# container_commands: | |
# 20_php71_upgrade: | |
# command: sudo bash scripts/upgrade-php71.sh |
720p -> H.264 (x264) video + AAC 128kbps audio:
ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -sameq -acodec libfaac -ab 128k -ar 44100 -ac 2 -s 1280x720 -vpre normal -b 1M output.mp4
#!/bin/bash | |
#============================================================================== | |
#TITLE: mysql_backup.sh | |
#DESCRIPTION: script for automating the daily mysql backups on development computer | |
#AUTHOR: tleish | |
#DATE: 2013-12-20 | |
#VERSION: 0.4 | |
#USAGE: ./mysql_backup.sh | |
#CRON: | |
# example cron for daily db backup @ 9:15 am |
<?php | |
// create client | |
$client = new \GuzzleHttp\Client(); | |
$res = $client->request('GET', $someApi, ['http_errors' => false]); | |
// check http status code | |
if ($res->getStatusCode() != 200) { | |
// handle it | |
} |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted |