Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
| .mktoForm, .mktoForm .mktoFieldWrap, .mktoForm .mktoHtmlText, .mktoForm input, .mktoLogicalField .mktoCheckboxList {width:100% !important;} | |
| @media only screen and (min-width:480px) { | |
| .mktoFormCol:first-child:nth-last-child(2), .mktoFormCol:first-child:nth-last-child(2) ~ .mktoFormCol {width: 100% !important;} | |
| .mktoFormCol:first-child:nth-last-child(3), .mktoFormCol:first-child:nth-last-child(3) ~ .mktoFormCol {width: 50% !important;} | |
| .mktoFormCol:first-child:nth-last-child(4), .mktoFormCol:first-child:nth-last-child(4) ~ .mktoFormCol {width: 33.3333% !important;} | |
| .mktoFormCol:first-child:nth-last-child(3) ~ .mktoFormCol {padding-left: 0.3em !important;} | |
| } | |
| @media only screen and (max-width:480px) {.mktoFormCol {width:100% !important;}} | |
| .mktoAsterix{display:none !important;} | |
| .mktoForm .mktoGutter {display:none !important;} |
Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
| # Recursively optimize PNG and JPEG images using convert command | |
| # | |
| # `convert` is part of ImageMagick (http://www.imagemagick.org/). You will need to install it first. | |
| # | |
| # Author: Rajendra Kumar Bhochalya (http://rkb.io) | |
| # | |
| # @see https://developers.google.com/speed/docs/insights/OptimizeImages | |
| # Optimize all JPEG images in current directory and subdirectories | |
| find . -name "*.jpg" -exec convert "{}" -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace RGB "{}" \; -exec echo "{}" \; |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
| import requests | |
| from datetime import datetime | |
| myUrl = 'http://myurl/' | |
| def send_simple_message(status): | |
| myTime = datetime.now().strftime("%Y-%m-%d %H:%M:%S") | |
| myText = "As of " + myTime + " the URL "+ myUrl +" is down with a status " + str(status) | |
| return requests.post( | |
| "API_URL", |
| <?php | |
| function ab_tester_shortcode_callback($atts, $content = null){ | |
| $display = false; | |
| $a = shortcode_atts(array( | |
| 'variant_key' => 'utm_variant', | |
| 'variant' => 'default', | |
| 'method' => 'GET' | |
| ),$atts); |
| #!/usr/bin/perl | |
| use strict; | |
| my $HOST="subdomain.hostname.com"; | |
| my $NSCA_HOST="NSCA HOST IP ADDRESS"; | |
| my $NSCA_CONFIG="/etc/send_nsca.cfg"; | |
| my $NSCA="/usr/sbin/send_nsca"; | |
| my $PLUGINS_PATH="/usr/lib/nagios/plugins/"; | |
| my $DISK_ARGS="-w 20% -c 10% -p "; | |
| my $CHECK_ROOT="/usr/lib/nagios/plugins/check_disk ". $DISK_ARGS ."/"; | |
| my $CHECK_PROCS="/usr/lib/nagios/plugins/check_procs -w 250 -c 400 -s RSZDT"; |
| #!/usr/bin/perl -w | |
| #use strict; | |
| #Author: Dennison Williams | |
| use Nagios::Plugin; | |
| use Data::Dumper; | |
| use File::Basename; | |
| my $pgrep = '/usr/bin/pgrep '; | |
| my $netstat = '/usr/bin/sudo /bin/netstat -tnup --listening'; | |
| my $VERSION = '0.1'; |