Theory and Practice
About Archives Categories Tags Authors 中文 ไทย
  1. Tags
  2. Commandline

adb push error: remote couldn't create file: Operation not permitted

January 02, 2022

adb push error caused by illegal character in file name on Android.

 read more »

Update Modification Time According to EXIF Data

December 31, 2021 (Updated: April 26, 2023)

Update modification time of photo/video according to EXIF data using command line.

 read more »

Find Image With Specific Dimension Using Command Line

December 19, 2021

Find images with specific dimension using Linux command line.

 read more »

Copy Files to Android While Preserving Timestamp

November 15, 2021

Copy files to Android smart phone without losing timestamps.

 read more »

[Pelican] Build Offline Copy of Website

January 01, 2019

Build an offline copy of a website made by Pelican static site generator.

 read more »

Pass Command-line Arguments to Makefile and Go Program

May 15, 2018

Pass command-line arguments to make and then pass then arguments to Go program in Makefile.

 read more »

Ubuntu Linux 18.04 Run Out of Disk Space

May 11, 2018

Upgrade from Ubuntu Linux 17.10 to 18.04 and disk space runs out quickly. And how I fix this issue.

 read more »

[Bash] List Go Source Files Excluding Test Files

March 23, 2018

List .go source files excluding _test.go files via find and grep command in bash.

 read more »

[Bash] List Directory Size in Descending and Ascending Order

March 22, 2018

List folder size in descending and ascending order via du and sort command in bash.

 read more »

[Golang] Check If A Program (Command) Exists

March 16, 2018

Check if a program (or command), such as wget or ffmpeg, is available in Go.

 read more »

Merge Instagram Post Live Video and Audio in ffmpeg

March 07, 2018

Use ffmpeg to merge Instagram video and audio of live replay shared to stories.

 read more »

[Golang] Run wget via Shell Command

March 04, 2018

Use Go standard os/exec package to run wget via shell command.

 read more »

[Golang] Disable Test Cache

March 01, 2018

Disable caching in Go test.

 read more »

[Makefile] Check if Run on Travis CI

June 13, 2017

Check if Makefile runs on Travis CI or not.

 read more »

[Makefile] Rules for Linters of Golang Source Code

May 10, 2017

Example of Makefile rules for Go linters.

 read more »

Pass Command Line Arguments (Flags) in Go Test

April 28, 2017

Pass command line arguments (flags) in Go test.

 read more »

[Makefile] Publish to GitHub Pages Automatically

March 31, 2017

Create gh-pages branch and publish your static website to GitHub Pages in Makefile.

 read more »

[Bash] Move Directories and Modify Path in Files

January 18, 2017

Replace specific pattern of strings in HTML files under directory via sed.

 read more »

[sed] Replace String in Directory

January 11, 2017

Replace specific pattern of strings in HTML files under directory via sed.

 read more »

[Makefile] Get Prefix or Suffix from String

December 29, 2016

Get prefix or suffix of a string in Makefile.

 read more »

[Makefile] Online Concatenate and Compress JavaScript Files

December 26, 2016

Concatenate and minify JavaScript files via Makefile, curl, and online Google Closure Compiler.

 read more »

[Bash] Online Concatenate and Compress JavaScript Files

December 25, 2016

Concatenate and minify JavaScript files via Bash script, curl, and online Google Closure Compiler.

 read more »

[Makefile] Publish Static Website to GitHub Project Pages

December 24, 2016

Publish your static website to GitHub project pages via ghp-import in Makefile.

 read more »

[Makefile] Check Installed Package Version on Ubuntu Linux

December 23, 2016

Given an installed package name on Ubuntu Linux, find its version in Makefile.

 read more »

[Golang] Parse Command Line Arguments - String Variable

December 21, 2016

How to parse command-line arguments (string variable) via flag package in Go programming language.

 read more »

[Bash] Copy Large Number of Files on Linux

December 20, 2016

Copy large number of files efficiently via Bash script on Linux.

 read more »

[Bash] Find Redundant Files Saved by Chrome

May 23, 2016

Find redundant files saved by Chrome browser via Bash script.

 read more »

[Golang] Find Redundant Files Saved by Chrome

May 22, 2016

Find redundant files saved by Chrome browser via Go.

 read more »

[Bash] Find and Remove Files in One Line of Command

May 20, 2016

Use find command to find all files with specific name and delete them in one line of command.

 read more »

[Bash] find Command Exclude Sub-directory

May 19, 2016

Use find command to find all HTML files in a directory, but exclude the HTML files in some sub-directory.

 read more »

Run wkhtmltopdf With Chinese Font Support on Travis CI

May 18, 2016

Run wkhtmltopdf on Travis CI, which convert HTML files with chinese characters to PDF.

 read more »

[Bash] HTML to PDF via wkhtmltopdf

May 17, 2016

Convert HTML files in directory to PDF recursively via wkhtmltopdf and Bash script.

 read more »

[Bash] Remove Execute Permission of Files in Directory Recursively

May 09, 2016

Remove execute(x) permission of files in directory recursively via chmod command and Bash script.

 read more »

rsync over SSH with Key

May 03, 2016

Example of copy local files to remote machine which allows only SSH key login via rsync command.

 read more »

[AWS] Upgrade from Ubuntu 12.04 to 14.04

May 01, 2016

Upgrade from AWS EC2 t1.micro running Ubuntu 12.04 LTS with Apache-2.2 to t2.nano running Ubuntu 14.04 LTS with Apache-2.4.

 read more »

[AWS] Create/Migrate Linux Users on Amazon EC2

April 30, 2016

Create or migrate user account with SSH login only (no password login) on AWS EC2 t2.nano with Ubuntu 14.04 LTS.

 read more »

[Bash] Move Large Number of Files via tar Command

April 29, 2016

Move large number of files via tar command under Bash. This is much quicker than mv command if there are a lot of small files.

 read more »

[Bash] Process HTML Files Format in Volumn

April 26, 2016

Convert the format (Big5 encoding to UTF-8, remove DOS newline in file, replace string big5 with UTF-8, and append UNIX newline to end of file) of HTML files in directory via Bash script.

 read more »

[Bash] Rename Files in Directory to Lowercase

April 25, 2016

Convert the name of files in directory to lowercase via Bash script.

 read more »

[Golang] Read Yes/No From Console

April 23, 2016

Read Yes/No (i.e., ask for user confirmation) from console in Go programming language.

 read more »

[Bash] Encoding Conversion, Newline Manipulation, String Replacement of File

April 20, 2016

Convert encoding of file from Big5 to UTF-8, remove DOS newline in file, replace string big5 with UTF-8, and append UNIX newline to end of file.

 read more »

[Golang] Extract Text via State Machine and goquery

April 11, 2016

Extract text (i.e., footnote) in HTML via state machine and goquery in Go programming language.

 read more »

[Golang] Iterate over All DOM Elements in HTML

April 10, 2016 (Updated: April 15, 2016)

Iterate over all DOM elements in HTML via Go programming language. Use net/html package to parse and iterate all elements in HTML. Search for HTML links and output them in reStructuredText format.

 read more »

[Makefile] String Replacement Example

April 08, 2016

Example for how to replace a string in a variable in Makefile.

 read more »

[sed] Replace reStructuredText Link by Regular Expression

March 30, 2016

Make reStructuredText links of the same name anonymous via regular expression by sed stream editor.

 read more »

[sed] Replace Footnote by Regular Expression

March 29, 2016

Replace footnote in reStructuredText format via regular expression by sed stream editor.

 read more »

[Golang] Get HTML Title via goquery

March 22, 2016

A simple example to read HTML title via goquery in Go.

 read more »

Makefile notdir = Python basename / Golang path.Base

March 21, 2016

Makefile's notdir = Python basename / Go path.Base.

 read more »

[Golang] Convert File Encoding From Big5 to UTF-8

March 21, 2016

Convert file encoding from Big5 to UTF-8 via Go programming language.

 read more »

[sed] Insert Line After First Pattern Match

March 20, 2016

Insert a line after first pattern match via sed stream editor.

 read more »

[Golang] Download HTML From URL

March 19, 2016 (Updated: October 10, 2018)

Download and save HTML file from given URL via Go. Do nothing if the HTML file already locally exists.

 read more »

[Bash] Convert Files in Directory From Big5 to UTF-8

March 18, 2016

Convert all files in a directory recursively (i.e., including subdirectories of the directory) from Big5 encoding to UTF-8 via iconv command.

 read more »

[sed] Append Text at the Beginning of Each Line

March 15, 2016

Append text at the beginning of each line via sed stream editor.

 read more »

[Makefile] Convert Traditional Chinese PO file to Simplified Chinese via OpenCC

March 12, 2016

Convert Traditional Chinese PO file to Simplified Chinese via OpenCC and sed in Makefile.

 read more »

[Makefile] Concetenate and Minify CSS via sed and tr Command

March 11, 2016

Concatenate and Minify CSS via sed and tr command in Makefile.

 read more »

[Golang] Online Concatenate and Compress JavaScript Files

March 07, 2016

Concatenate and compress JavaScript files via Go programming language and online Google Closure Compiler.

 read more »

[Golang] Concatenate JavaScript Files

March 06, 2016

Concatenate JavaScript files via Go programming language.

 read more »

[Makefile] Create Symbolic Link If Not Exist

March 04, 2016

Makefile - Create symbolic link if it does not exist. Otherwise do nothing.

 read more »

[Python] Find Redundant Files Saved by Chrome

March 03, 2016

Find redundant files saved by Chrome browser via Python.

 read more »

[Python] Online Concatenate and Compress JavaScript Files

February 26, 2016

Online concatenate and compress JavaScript files via Python script.

 read more »

[Python] Concatenate JavaScript Files

February 25, 2016

Concatenate JavaScript files via Python script.

 read more »

[Bash] Convert wav to mp3 via ffmpeg

February 22, 2016

Write a bash script to convert wav to mp3 via ffmpeg on Ubuntu Linux 15.10.

 read more »

[Golang] mkdir -p

February 22, 2016

mkdir -p command in Go

 read more »

[Python] mkdir -p

February 21, 2016

mkdir -p command in Python

 read more »

[Makefile] Echo Color Output

February 18, 2016

echo colorful output in Makefile.

 read more »

[Makefile] Create Directory If Not Exist

January 30, 2016

Makefile - Create a directory if it does not exist. Otherwise do nothing.

 read more »

[Golang] GopherJS serve and build Command Usage

January 10, 2016

Example of how to use serve and build command of GopherJS.

 read more »

[Bash] Use wget to Fetch Webpages

January 02, 2016

Write a bash script to use wget to fetch webpages.

 read more »

[Golang] Read Command-line Arguments Example

February 18, 2015

How to pass command-line arguments (flags) in Go programming language.

 read more »

[Bash] List All Files in Directory Recursively and Rename

February 02, 2015

List all files in a directory recursively (i.e., including subdirectories of the directory), and use sed to rename the files.

 read more »
Powered by Github Pages, Pelican, pyScss.