sudo apt-get update
sudo apt-get install build-essential
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-get install -y golang-go
{ | |
"meta": { | |
"theme": "elegant" | |
}, | |
"basics": { | |
"name": "Asaduzzaman \"Asad\" Pavel", | |
"label": "Backend Software Engineer", | |
"email": "[email protected]", | |
"phone": "+880 175 565 5440", | |
"website": "https://iampavel.dev", |
# Check these threads before proceeding: | |
# https://github.com/microsoft/WSL/discussions/5857 | |
# https://github.com/microsoft/WSL/issues/5821 | |
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { | |
$CmdLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments | |
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CmdLine | |
Exit | |
} |
// +build mage | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"os" |
options: | |
docker: true | |
pipelines: | |
branches: | |
master: | |
- step: | |
image: google/cloud-sdk:latest | |
name: Deploy to production | |
deployment: production | |
caches: |
GNU Parallel is a multipurpose program for running shell commands in parallel, which can often be used to replace shell script loops,find -exec
, and find | xargs
. It provides the --sshlogin
and --sshloginfile
options to farm out jobs to multiple hosts, as well as options for sending and retrieving static resources and and per-job input and output files.
For any particular task, however, keeping track of which files need to pushed to and retrieved from the remote hosts is somewhat of a hassle. Furthermore, cancelled or failed runs can leave garbage on the remote hosts, and if input and output files are large, sending them to local disk on the remote hosts is somewhat inefficient.
In a traditional cluster, this problem would be solved by giving all nodes access to a shared filesystem, usually with NFS or something more exotic. However, NFS doesn't wo
# encoding: UTF-8 | |
require 'optparse' | |
require 'net/http' | |
require 'json' | |
def parse_options(argv) | |
opts = {} | |
@parser = OptionParser.new do |o| |
apt-get update | |
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true | |
mkdir ~/ffmpeg_sources | |
cd ~/ffmpeg_sources | |
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git | |
cd fdk-aac | |
autoreconf -fiv | |
./configure --prefix="$HOME/ffmpeg_build" --disable-shared | |
make | |
make install |
<?php namespace Models; | |
use \AWS; | |
class File extends BaseModel { | |
/** | |
* The database table used by the model. | |
* | |
* @var string |
<?php | |
class ReverseFile implements Iterator | |
{ | |
const BUFFER_SIZE = 4096; | |
const SEPARATOR = "\n"; | |
public function __construct($filename) | |
{ | |
$this->_fh = fopen($filename, 'r'); | |
$this->_filesize = filesize($filename); |