Preparation
brew install Caskroom/cask/osxfuse
brew install ntfs-3g
Serria is now rootless, so we
need to disable rootless
csrutil disable
or reboot in recovery mode
if (sys.version_info > (3, 0)): | |
from contextlib import suppress | |
else: | |
from contextlib import contextmanager | |
@contextmanager | |
def suppress(*exceptions): | |
try: | |
yield | |
except exceptions: | |
pass |
<?php | |
class U_Yahoo{ | |
private function file_get_contents_curl($url) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
#!/usr/bin/sh | |
#install calibre | |
sudo yum install libg11-mesa-glx | |
sudo yum install libXcomposite | |
sudo yum install libGL | |
sudo pip install QtGui | |
#MACOS imagemagick 7 not work on any calibre-web | |
#brew install imagemagick@6 --with-liblqr --with-openjpeg |
wordpress: | |
image: wordpress | |
links: | |
- wordpress_db:mysql | |
ports: | |
- 8080:80 | |
volumes: | |
- ~/wordpress/html:/var/www/html | |
- /static | |
- another_static:/static2 |
#/usr/sbin/setsebool httpd_can_network_connect 1 if cannot localhost | |
#/usr/sbin/setsebool -P httpd_can_network_connect 1 if cannot localhost | |
# | |
<VirtualHost *:80> | |
ProxyPreserveHost On | |
ServerName myhostname.com | |
ProxyPass / http://localhost:808/ | |
ProxyPassReverse / http://localhost:808/ | |
</VirtualHost> |
sudo vi /etc/ssh/sshd_config | |
#Set the following two options: | |
#X11Forwarding yes | |
#X11UseLocalhost no | |
sudo /etc/init.d/sshd reload | |
sudo yum install xauth | |
#ssh from mac |
Preparation
brew install Caskroom/cask/osxfuse
brew install ntfs-3g
Serria is now rootless, so we
need to disable rootless
csrutil disable
or reboot in recovery mode
sudo chcon -R -v -t httpd_sys_content_t www/ | |
sudo chcon -R -v -t httpd_sys_rw_content_t www/wp-content/plugins/ www/wp-content/themes/ www/wp-content/upgrade/ www/wp-content/uploads/ |
var fs = require("fs"); | |
var Fontmin = require('fontmin'); | |
var content = fs.readFileSync('a.txt', 'utf8'); | |
var fontmin = new Fontmin() | |
.src('a.ttf') | |
.use(Fontmin.glyph({ | |
text: content, | |
hinting: false // keep ttf hint info (fpgm, prep, cvt). default = true |