Techy Things

Backbone bootstrap model validations 0

Backbone bootstrap model validations

Scenario We have fields that needs to be validated. We already highlight the erroneous field(s) and display a specific message below each erroneous field. Now we want to display a popup notification on the...

Compile ffmpeg on Windows natively with Visual Studio 2013 0

Compile ffmpeg on Windows natively with Visual Studio 2013

Downloads MSYS (Install it) http://www.mingw.org/download/installer Choose at least install options gcc-g++ as below Then click Installation | Apply Changes FFmpeg source code https://github.com/FFmpeg/FFmpeg Visual Studio 2013 Free Community Edition (Install it) https://www.visualstudio.com/en-us/news/releasenotes/vs2013-community-vs YASM http://yasm.tortall.net/Download.html...

npm not found when under sudo 0

npm not found when under sudo

[dev@squarepants www]$ sudo npm install -g bbb sudo: npm: command not found Solution You have probably like me installed node with nvm (node version manager). This installs node locally for the user and root...

jQuery prevent uploading too large file in Frontend 0

jQuery prevent uploading too large file in Frontend

afterRender:       // Only works on HTML5       $('#file').on('change', function() {         $("#upload-package").prop("disabled",  false);         var sizeLimit = 90;         if (this.files && this.files.length && this.files[0].size > sizeLimit*1024*1024) {           notifier.error_x("File size exceeds limit...

Mousewheel prevent body scroll on modal 0

Mousewheel prevent body scroll on modal

Solution #1   // prevent background of modal from scrolling   // DOMMouseScroll for Firefox equivalent   $(document).on("mousewheel DOMMouseScroll", ".modal-backdrop, .modal-body", function(event) {     event.stopPropagation();     event.preventDefault();   });   // prevent background of...

Build a Slim PHP 3 webapp with social logins and emails 0

Build a Slim PHP 3 webapp with social logins and emails

Prerequisites PHP 5.6+ Edit php.ini always_populate_raw_post_data = -1 Uncomment extension=php_curl.dll extension=php_mbstring.dll extension=php_mysql.dll extension=php_mysqli.dll extension=php_pdo_mysql.dll extension=php_openssl.dll Composer Linux> curl -sS https://getcomposer.org/installer | php Windows> Download & Install Composer-Setup.exe Development Cycle Windows> php -S 127.0.0.1:8080 -t...

No package 'pciaccess' found 0

No package 'pciaccess' found

checking whether /usr/bin/gcc -std=gnu99 supports -Winline... yes checking whether /usr/bin/gcc -std=gnu99 supports -Wshadow... yes checking which warning flags were supported... -Wall -Wextra -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2...

Boost CPU to max speed on Linux/CentOS 0

Boost CPU to max speed on Linux/CentOS

As I was filling up a ticket and pasting my /proc/cpuinfo I realized my CPU were running at 800MHz Solution $> sudo nano /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor It will repeat for each of your Core. Is it useful...