Skip to content

Instantly share code, notes, and snippets.

View oprearocks's full-sized avatar
🏖️
AFO — Away From the Office

Adrian Oprea oprearocks

🏖️
AFO — Away From the Office
View GitHub Profile
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>qbox.me</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
@oprearocks
oprearocks / encoding-video.md
Created September 12, 2017 06:50 — forked from Vestride/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aacc --with-opus
@oprearocks
oprearocks / wkhtmltopdf@Debian8.sh
Created August 18, 2017 08:26 — forked from fedir/wkhtmltopdf@Debian8.sh
Install wkhtmltopdf on Debian 8
apt-get update
aptitude install xfonts-base xfonts-75dpi fontconfig xvfb
mkdir ~/src/wkhtmltopdf -p
cd ~/src/wkhtmltopdf
wget https://bitbucket.org/wkhtmltopdf/wkhtmltopdf/downloads/wkhtmltox-0.13.0-alpha-7b36694_linux-jessie-amd64.deb
dpkg -i wkhtmltox-0.13.0-alpha-7b36694_linux-jessie-amd64.deb
echo 'xvfb-run --server-args="-screen 0, 1024x768x24" /usr/local/bin/wkhtmltopdf $*' > /usr/bin/wkhtmltopdf.sh
chmod a+rx /usr/bin/wkhtmltopdf.sh
ln -s /usr/bin/wkhtmltopdf.sh /usr/local/sbin/wkhtmltopdf
/usr/local/sbin/wkhtmltopdf https://www.google.fr output.pdf
168 wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-jessie-amd64.deb
169 ls
170 sudo apt-get install libjpeg8 libpng12-0 xfonts-base xfonts-scalable
171 sudo apt-get install libpng12-0 xfonts-base xfonts-scalable
172 sudo dpkg -u wkhtmltox-0.12.2_linux-jessie-amd64.deb
173 sudo dpkg -i wkhtmltox-0.12.2_linux-jessie-amd64.deb
174 sudo apt-get install xfonts-75dpi
175 sudo dpkg -i wkhtmltox-0.12.2_linux-jessie-amd64.deb
176 sudo cp /usr/local/bin/wkhtmltopdf /usr/bin/
177 sudo cp /usr/local/bin/wkhtmltoimage /usr/bin/

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
#!/usr/bin/env bash
#
# Cleanup temporary files on a Linux Mint 15 Olivia installation.
#
# This script will happily wipe all root/user temporary files, old kernels,
# browser caches and cpan/cpanm build directories. Review before running
# blindly.
#
# Though, so far, there are no Linux Mint 15 Olivia specific cleanups here,
# this script ensures, that we're really running under this distribution. Feel