Install required packages:
$ sudo apt-get install -y python3 python-pip
$ sudo pip install virtualenv
Setup and activate a Python 3 virtual environment named "venv":
$ virtualenv -p python3 venv
$ source venv/bin/activate
Install required packages:
$ sudo apt-get install -y python3 python-pip
$ sudo pip install virtualenv
Setup and activate a Python 3 virtual environment named "venv":
$ virtualenv -p python3 venv
$ source venv/bin/activate
Ubuntu, Fedora, openSUSE, CentOS, SUSE Linux Enterprise, Debian,... users can finally use Autodesk Fusion 360 in the Linux Browser now.
On Chromium 55.0.2843.0 I get NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED.
| When programming apps for Android, you usually want to test them on real Android devices. | |
| This little gist describes how to do so using Ubuntu 14. | |
| First, you need to download and install the Android development IDE (http://developer.android.com/sdk/index.html) and create an Android project which you want to debug. | |
| Next, you need to setup the debugging mode on your Android device. Starting in Android 4.2 you need to enable the developer options first: 1) Go to settings 2) Go to About Phone 3) Tap the build number 10 times (or more, not sure ;)) and you will get the notification that you enabled it. | |
| Then go to the developer settings and enable the debug mode for your phone. | |
| Now you think you can just plug it into your USB mode? - Nope. |
| <!-- What is Functions File in WordPress? --> | |
| <!-- Functions file commonly known as functions.php file is a WordPress theme file. | |
| It comes with all free and premium WordPress themes. | |
| The purpose of this file is to allow theme developers to define theme features and functions. This file acts just like a WordPress plugin and can be used to add your own custom code snippets in WordPress. | |
| You would find many of these code snippets on websites like https://deardorffassociatesweb.wordpress.com/ with instructions telling you to add this code in your theme’s functions.php file or a site-specific WordPress plugin. | |
| Now you may be thinking what’s the difference between a site-specific WordPress plugin and functions.php file? Which one is better? |
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro | |
| # | |
| WP_OWNER=changeme # <-- wordpress owner | |
| WP_GROUP=changeme # <-- wordpress group | |
| WP_ROOT=/home/changeme # <-- wordpress root directory |
| /** | |
| * Prevent update notification for plugin | |
| * http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/ | |
| * Place in theme functions.php or at bottom of wp-config.php | |
| */ | |
| function disable_plugin_updates( $value ) { | |
| if ( isset($value) && is_object($value) ) { | |
| if ( isset( $value->response['plugin-folder/plugin.php'] ) ) { | |
| unset( $value->response['plugin-folder/plugin.php'] ); | |
| } |
| ##################### | |
| # | |
| # Use this with or without the .gitattributes snippet with this Gist | |
| # create a fixle.sh file, paste this in and run it. | |
| # Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF) | |
| # This Gist normalizes handling by forcing everything to use Unix style. | |
| ##################### | |
| # Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF |
| <?php | |
| /** | |
| * ----------------------------------------------------------------------------------------- | |
| * Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
| * ----------------------------------------------------------------------------------------- | |
| */ | |
| // HTML Minifier | |
| function minify_html($input) { |
| // With $script variable | |
| $(document).ready(function() { | |
| $('script[type="text/javascript/defer"]').each(function() { | |
| var $script = $('<script type="text/javascript"/>').text($(this).clone().text()); | |
| $(this).after($script).remove(); | |
| }); | |
| }); | |
| // Without $script variable | |
| $(document).ready(function() { |
| <div><!-- social media share buttons --> | |
| <a href="http://www.facebook.com/" onclick="window.location = 'http://www.facebook.com/share.php?u=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/aLnZg.png" alt="Share on Facebook" border="0" /></a> | |
| <a href="http://twitter.com/" onclick="window.location = 'http://twitter.com/home/?status=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/oFrLG.png" alt="Tweet This" border="0" /></a> | |
| <a href="http://www.linkedin.com/" onclick="window.location = 'http://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/mwHNU.png" alt="Share on LinkedIn" border="0" /></a> | |
| <a href="https://plus.google.com/" onclick="window.location = 'https://plus.google.com/share?url=' + encodeURIComponent(window.location); return false"><img src="http://i.imgur.com/tzMMp.png" alt="Share on Google+" border="0" /></a> |