Installing Xcode and the command line tools need to be done first because it installs gcc.
https://developer.apple.com/xcode/features/
Or via the terminal:
| #!/usr/bin/env python | |
| """ | |
| Hack to look for user agent strings in typical Apache style log and | |
| count up the number of requests by bots vs non-bots. The list of bot | |
| user agents comes from http://www.user-agents.org/ but has had some | |
| agents added to it, since the user-agents.org list is pretty out of date, e.g. | |
| no Bing?! | |
| """ |
Installing Xcode and the command line tools need to be done first because it installs gcc.
https://developer.apple.com/xcode/features/
Or via the terminal:
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| WP_OWNER=www-data # <-- wordpress owner | |
| WP_GROUP=www-data # <-- wordpress group | |
| WP_ROOT=$1 # <-- wordpress root directory |
| (function getABTest() { | |
| var abTestName = '', | |
| abTestVariation = '', | |
| abTest = 'No test', | |
| abTestExperiments = optimizely.allExperiments[Object.keys(optimizely.variationMap)]; | |
| if (abTestExperiments) { | |
| abTestVariation = Object.keys(optimizely.variationNamesMap).map(function(el) { return optimizely.variationNamesMap[el]; })[0]; | |
| abTestName = abTestExperiments.name; | |
| abTest = abTestName + ': ' + abTestVariation; |
| Specifically, this gruntfile will perform the following. | |
| - CSS: | |
| -- Compile SCSS | |
| -- Add vendor prefixes for the last 10 browser versions | |
| - JS: | |
| -- Run scripts through jshint to detect errors and potential problems in code. | |
| -- Compile scripts to your destination folder in their original state. Use these in development environments as they'll be easier to debug with as their code doesn't exist on 1 line, nor is it obfuscated. | |
| -- Minify and concatenate scripts into one all.min.js. Uglify will also obfuscate code if you set mangle to true, leave as false if using AngularJS. |
| // Optimizely JavaScript API | |
| // http://developers.optimizely.com/javascript/ | |
| // To opt a visitor out of Optimizely tracking | |
| // http://www.example.com/page.html?optimizely_opt_out=true | |
| // 1. API Function Calls | |
| // http://developers.optimizely.com/javascript/#api-function-calls-2 | |
| (function() { | |
| var $ = optimizely.$; | |
| $.each(optimizely.allExperiments, function(id, experiment) { | |
| var data = { | |
| name: experiment.name | |
| }; | |
| if (experiment.enabled) data['enabled'] = true; | |
| console.group(data); | |
| if (experiment.variation_ids) $.each( | |
| experiment.variation_ids, |
| // install | |
| // npm i gulp-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f | |
| // node node_modules/jpegtran-bin/lib/install.js | |
| // node node_modules/gifsicle/lib/install.js | |
| // node node_modules/zopflipng-bin/lib/install.js | |
| // node node_modules/mozjpeg/lib/install.js | |
| // node node_modules/giflossy/lib/install.js | |
| // node node_modules/pngquant-bin/lib/install.js |