- Step 1, create Service in Automator:
- Step 2, set Service for files:
- Step 3: insert bash script (see below)
- Step 4, save:
| var sinon = require('sinon'); | |
| it("Should be able to set the validation mode", function(done) { | |
| var spy = sinon.spy(AuthorizeCIM.AuthorizeRequest, 'send'); | |
| var date = new Date(); | |
| var options = { | |
| customerType: 'individual', | |
| payment: new Authorize.Payment({ | |
| creditCard: new Authorize.CreditCard({ | |
| cardNumber: '4111111111111111', |
| var gulp = require('gulp') | |
| var browserify = require('browserify') | |
| var watchify = require('watchify') | |
| var babelify = require('babelify') | |
| var source = require('vinyl-source-stream') | |
| var buffer = require('vinyl-buffer') | |
| var merge = require('utils-merge') |
| To remove a submodule you need to: | |
| Delete the relevant line from the .gitmodules file. | |
| Delete the relevant section from .git/config. | |
| Run git rm --cached path_to_submodule (no trailing slash). | |
| Commit and delete the now untracked submodule files. |
| #!/bin/bash | |
| # Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
| # Inspired from https://gist.github.com/faleev/3435377 | |
| # Remove any existing packages: | |
| sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
| # Get the dependencies (Ubuntu Server or headless users): | |
| sudo apt-get update |
| /* | |
| Copyright (c) 2016 Micha Mettke | |
| This software is provided 'as-is', without any express or implied | |
| warranty. In no event will the authors be held liable for any damages | |
| arising from the use of this software. | |
| Permission is granted to anyone to use this software for any purpose, | |
| including commercial applications, and to alter it and redistribute it | |
| freely, subject to the following restrictions: |
| set $mobile_rewrite do_not_perform; | |
| if ($http_user_agent ~* "(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|ipad|android 3|sch-i800|playbook|tablet|kindle|gt-p1000|sgh-t849|shw-m180s|a510|a511|a100|dell streak|silk|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino") { | |
| set $mobile_rewrite perform; | |
| } | |
| if ($http_user_agent ~* "^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m| |
| #define _GNU_SOURCE 1 | |
| #include <sched.h> // sched_setaffinity | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <limits.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <pthread.h> | |
| #include <assert.h> | |
| #include <sys/time.h> |
| #define _GNU_SOURCE 1 | |
| #include <sched.h> // sched_setaffinity | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <limits.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <pthread.h> | |
| #include <assert.h> | |
| #include <sys/time.h> |
| /// This defines a custom Diesel type for storing a 6-bit integer and a 58-bit | |
| /// integer in the same 64-bit SQL column | |
| use std::error::Error; | |
| use std::fmt; | |
| use std::io::Write; | |
| use diesel::backend::Backend; | |
| use diesel::types::{FromSqlRow,FromSql,ToSql,HasSqlType,IsNull,BigInt,Nullable}; | |
| use diesel::expression::AsExpression; | |
| use diesel::row::Row; |