Works great in combination with yajs, really makes for a very good JS development experience in VIM. In combination with syntastic/eslint/eslint-plugin-react, neocomplete, tern_for_vim, and javascript-libraries-syntax.vim it get's pretty near to perfect for me.
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
# Feel free to change this path of course (and keys_zone value as well, but also change the usage of it below). | |
proxy_cache_path /var/www/cache/resized levels=1:2 keys_zone=resizedimages:10m max_size=1G; | |
# Gzip was on in another conf file of mine...You may need to uncomment the next line. | |
#gzip on; | |
gzip_disable msie6; | |
gzip_static on; | |
gzip_comp_level 4; | |
gzip_proxied any; | |
# Again, be careful that you aren't overwriting some other setting from another config's http {} section. |
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 | |
# Replace <yourCA> with the filename | |
# The output will be in the same format as ones in ca-bundle.crt | |
openssl x509 -in <yourCA>.crt -text >> /usr/share/ssl/certs/ca-bundle.crt |
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
""" | |
This python script encodes all files that have the extension mkv in the current | |
working directory. | |
Sources: | |
http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide | |
""" | |
import subprocess, os | |
#------------------------------------------------------------------------------- |
#######Compiling nginx with pagespeed and GeoIP module
As root execute below commands
# yum install gcc-c++ pcre-devel pcre-devel zlib-devel make unzip openssl-devel
And then download PageSpeed with below commands
# mkdir -P /opt/nginx; mkdir -P /opt/nginx/modules/;
# cd /opt/nginx/modules
# NPS_VERSION=1.9.32.3
# wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.zip
# unzip release-${NPS_VERSION}-beta.zip
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
See my DASH-IF presentation from October, 2014: | |
https://s3.amazonaws.com/misc.meltymedia/dash-if-reveal/index.html#/ | |
1. encode multiple bitrates with keyframe alignment: | |
ffmpeg -i ~/Movies/5D2_Portrait.MOV -s 1280x720 -c:v libx264 -b:v 1450k -bf 2 \ | |
-g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 32000 out.mp4 | |
My input was 30 fps = 3000 ms. If it were 29.97, then a GOP size of 90 frames will yield a base segment | |
size of 3003 milliseconds. You can make the segment size some multiple of this, e.g.: 6006, 9009, 12012. |
On mac:
- Download the latest release.
- Extract the binary and place it in
/usr/local/bin
.
- Use collections.Counter() for high performance containers as an alternative to dict(), userful for counting occurances. #Python https://docs.python.org/2/library/collections.html