We need to install chrome (browser), x11 server (utilities) and unclutter (remove cursor)
sudo apt-get install chromium x11-xserver-utils unclutter
Enable SSH access and boot to desktop in using rasp-config
#!/bin/bash | |
# ----------------------------------------------- # | |
# Install an AMP environment on Ubuntu 14.04 | |
# ----------------------------------------------- # | |
# Update the system's repositories | |
sudo apt-get update | |
# Install apache2, mysql-server and PHP5 | |
sudo apt-get install apache2 mysql-server libapache2-mod-auth-mysql php5-mysql php5 libapache2-mod-php5 php5-mcrypt php5-cli php5-gd php5-curl php5-imagick mcrypt phpmyadmin |
#!/bin/bash | |
# ----------------------------------------------- # | |
# Restart AMP | |
# ----------------------------------------------- # | |
sudo service apache2 stop | |
sudo service mysql restart | |
sudo service apache2 start |
$country_codes = array( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', | |
'AO' => 'Angola', | |
'AI' => 'Anguilla', | |
'AQ' => 'Antarctica', |
# | |
# Original code copied from @ http://www.boback.com/2013/how-to-convert-flac-to-mp3-ubuntu-command-line/ | |
# | |
# Install lame and flac | |
sudo apt-get install lame flac | |
# For each file in the current directory, pass it through lame and output as MP3 | |
for f in *.flac; do flac -cd "$f" | lame -b 320 - "${f%.*}".mp3; done |
#!/bin/bash | |
# Move a Source set of files to a Destination folder with a ".png" extension. | |
# Note that by default this script looks for any file with a name ending in "_IMAGE" but you can change this as you see fit. | |
# It also limits the depth to 1, so it doesn't search subfolders. | |
# The original purpose of this script was to move artwork loaded into an SFTP area by a client and place it somewhere else for automated processing, keeping their SFTP jail clear from old files. | |
# One Liner for Crontab | |
#cd /path/to/source; find . -name '*_IMAGE' -maxdepth 1 -exec mv '{}' /path/to/destination/'{}'.png \; ; | |
# We move to the source directory of the files, so during the find there's less work to to extracting the file name from the path in the mv command. |
#!/bin/bash | |
# ----------------------------------------------- # | |
# Install an AMP environment on Ubuntu 16.04 | |
# ----------------------------------------------- # | |
# Update the system's repositories | |
sudo apt-get update | |
# Install apache2, mysql-server and PHP5 | |
sudo apt-get install apache2 mysql-server php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7 |
I've needed to work with imagick for some projects and found a need for extracting the actual image from a transparent png using both PHP and bash under different circumstances. This file servers as notes on intersting articules/search results that have aided me.
# --------------------------------------- | |
# Git Commands | |
# --------------------------------------- | |
alias gits="git status" | |
alias gitp="git push" | |
alias gita="git add -A" | |
alias gitc="git commit" | |
alias gitcr="git remote set-url origin" | |
alias gitdiff="git difftool --tool=meld --dir-diff" |
# Find duplicate filenames | |
## Find everything in the Pictures directory with the same file name excluding extension. | |
ls -1 ~/Pictures/ | sed 's/\(.*\)\..*/\1/' | sort | uniq -c | grep -v " 1 " | |
# Find unique filenames | |
## Find everything in the Pictures directory without the same file name excluding extension. | |
ls -1 ~/Pictures/ | sed 's/\(.*\)\..*/\1/' | sort | uniq -c | grep -v " 2 " |