Skip to content

Instantly share code, notes, and snippets.

View vpotap's full-sized avatar

Vladimir Potapov vpotap

View GitHub Profile
/**
* Determine whether the file loaded from PhoneGap or not
*/
function isPhoneGap() {
return (window.cordova || window.PhoneGap || window.phonegap)
&& /^file:\/{3}[^\/]/i.test(window.location.href)
&& /ios|iphone|ipod|ipad|android/i.test(navigator.userAgent);
}
window.isMobileApp = !!isPhoneGap();
@vpotap
vpotap / _gvimrc
Created March 5, 2017 22:34 — forked from GopinathMR/_gvimrc
GVim config file (for both Windows and Unix)
" Gopi's _gvimrc file https://github.com/GopinathMR
" This file has been modified to make it work on both Windows and Linux
" Github gist location : https://gist.github.com/1100054
" If you find any issues or add any enhancements, please submit revised version as gist
"----------------------------------------------------------------------------------------------------------
" 1. OS specific
if ($OS == 'Windows_NT')
" Windows specific settings
@vpotap
vpotap / gunicorn_with_virtualenv
Created December 3, 2016 15:36 — forked from shrkw/gunicorn_with_virtualenv
CentOS init script for Gunicorn with Virtualenv
#!/bin/sh
#
# gunicorn_sr Startup script for gunicorn for sr
#
# chkconfig: - 86 14
# processname: gunicorn
# pidfile:
# description: Python application server
#
### BEGIN INIT INFO
@vpotap
vpotap / full-ffmpeg.sh
Last active December 14, 2017 23:38
Install full ffmpeg 2.7 in debian wheezy (with aac(m4a) and x264 support and VP8(libvpx))
#remove all old ffmpeg
sudo apt-get autoremove $(dpkg -l | grep ffmpeg | awk '{print $2}' | tr '\n' ' ')
sudo apt-get --purge remove $(dpkg -l | grep ffmpeg | awk '{print $2}' | tr '\n' ' ')
sudo find / | grep -w ffmpeg | sudo xargs rm -r -f
#add repo
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again