This file contains 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
# -*- coding: utf-8 -*- | |
import Image | |
def resize_and_crop(img_path, modified_path, size, crop_type='top'): | |
""" | |
Resize and crop an image to fit the specified size. | |
args: | |
img_path: path for the image to resize. |
This file contains 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
<link rel="shortcut icon" sizes="16x16 24x24 32x32 48x48 64x64" href="favicon.ico"> | |
<!-- Mobile (Android, iOS & others) --> | |
<link rel="apple-touch-icon" sizes="57x57" href="favicon-57.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="favicon-57.png"> | |
<link rel="apple-touch-icon" sizes="72x72" href="favicon-72.png"> | |
<link rel="apple-touch-icon" sizes="114x114" href="favicon-114.png"> | |
<link rel="apple-touch-icon" sizes="120x120" href="favicon-120.png"> | |
<link rel="apple-touch-icon" sizes="144x144" href="favicon-144.png"> | |
<link rel="apple-touch-icon" sizes="152x152" href="favicon-152.png"> |
This file contains 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
{ | |
"keys": ["tab"], | |
"command": "expand_abbreviation_by_tab", | |
// put comma-separated syntax selectors for which | |
// you want to expandEmmet abbreviations into "operand" key | |
// instead of SCOPE_SELECTOR. | |
// Examples: source.js, text.html - source | |
"context": [ | |
{ |
This file contains 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
#!/bin/bash | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
apt-get install pkg-config libmagickwand-dev -y | |
cd /tmp | |
wget https://pecl.php.net/get/imagick-3.4.4.tgz | |
tar xvzf imagick-3.4.4.tgz |
This file contains 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
<!-- From: https://gist.githubusercontent.com/sorvell/48f4b7be35c8748e8f6db5c66d36ee29/raw/67346e4e8bc4c81d5a7968d18f0a6a8bc00d792e/index.html --> | |
<!doctype html> | |
<html> | |
<head> | |
<!-- Polyfills only needed for Firefox and Edge. --> | |
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@latest/webcomponents-loader.js"></script> | |
</head> | |
<body> | |
<!-- Works only on browsers that support Javascript modules like | |
Chrome, Safari, Firefox 60, Edge 17 --> |