This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Convert mov to gif | |
### on mac | |
#prereq | |
brew install ffmpeg | |
brew cask install xquartz | |
brew install gifsicle | |
#command | |
ffmpeg -i in.mov -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##on mac | |
#prereq | |
brew install ffmpeg | |
brew cask install xquartz | |
brew install gifsicle | |
#command | |
ffmpeg -i in.mov -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#merge strategy for code that is partially merged | |
git merge --no-commit -s recursive -X ours master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To be updated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# any bash script that takes more than 5 mins to craft or google | |
#wget parallel / multi download | |
cat ../image-names | xargs -I {} echo "https://photos.net/photos/default/"{} | xargs -n1 -P16 wget | |
#wget a sitemap | |
wget --quiet http://www.xyz.com/sitemap.xml --output-document - | egrep -o "http?://[^<]+" | wget -i - | |
## then parse all urls | |
egrep -o "http?://[^<]+" sitemap-pt-p* | grep -vi schema | cut -c29- > ../all-posts-urls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#installation | |
sudo apt-get update | |
sudo apt-get install -y apache2 libapache2-mod-php5 unzip mysql-server libapache2-mod-auth-mysql php5-mysql php5-intl mcrypt php5-mcrypt | |
sudo a2enmod php5 | |
sudo php5enmod mcrypt | |
sudo apt-get install php5-imap | |
sudo php5enmod imap | |
cd /tmp/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#installation | |
sudo apt-get update | |
sudo apt-get install -y apache2 libapache2-mod-php5 unzip mysql-server libapache2-mod-auth-mysql php5-mysql php5-intl mcrypt php5-mcrypt | |
sudo a2enmod php5 | |
sudo php5enmod mcrypt | |
sudo apt-get install php5-imap | |
sudo php5enmod imap | |
cd /tmp/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# mounting an EBS volume | |
# | |
#Format volume | |
sudo mkfs.ext4 /dev/xvdf #/dev/sdf maps to /dev/xvdf on ubuntu | |
#Mount volume | |
sudo mkdir -m 000 /vol | |
echo "/dev/xvdf /vol auto noatime 0 0" | sudo tee -a /etc/fstab |