Installing Supervisor on OS X is simple:
sudo pip install supervisor
This assumes you have pip. If you don't:
| // assertions/compareScreenshot.js | |
| var resemble = require('resemble'), | |
| fs = require('fs'); | |
| exports.assertion = function(filename, expected) { | |
| var screenshotPath = 'test/screenshots/', | |
| baselinePath = screenshotPath + 'baseline/' + filename, | |
| resultPath = screenshotPath + 'results/' + filename, | |
| diffPath = screenshotPath + 'diffs/' + filename; |
| XBMC uses pycurl/libcurl to fetch stuff. YouTube requires the RC4 | |
| cipher that GnuTLS has removed for security reasons (or doesn't allow | |
| it to be selected, or XBMC doesn't allow to specify the cipher...). | |
| PyCurl linked against OpenSSL can take the RC4 argument and make the | |
| Youtube plugin work (Ubuntu ships it linked against GnuTLS), so we | |
| need to rebuild to make it work. | |
| /// | |
| from: https://code.google.com/p/wfuzz/wiki/PyCurlSSLBug |
| # spec/controllers/api_clients_controller_spec.rb | |
| RSpec.describe APIClientsController, type: :controller do | |
| let(:api_client) { mock_model(APIClient) } | |
| context "when HTTP Digest auth credentials are invalid" do | |
| before do | |
| authenticate_with_http_digest("invalid_login", "invalid_password") do | |
| get :index | |
| end | |
| end |
| #!/usr/bin/env bash | |
| git remote -v | grep fetch | grep github | \ | |
| while read remote url _; do | |
| if ! git config --get-all "remote.$remote.fetch" | grep -q refs/pull | |
| then | |
| git config --add "remote.$remote.fetch" \ | |
| '+refs/pull/*/head:refs/remotes/'"$remote"'/pull/*' | |
| fi | |
| done |
| function foo(x) { x = (typeof x != "undefined") ? x : 10; .. } | |
| function foo(x = 10) { .. } | |
| function foo(x,y,z) { .. }; foo.apply(null,[1,2,3]); | |
| function foo(x,y,z) { .. }; foo(...[1,2,3]); | |
| function foo() { var args = [].slice.call(arguments); .. } | |
| function foo(...args) { .. } | |
| var o = { x: 2, y: 3 }, x = o.x, y = o.y, z = (typeof o.z != "undefined") ? o.z : 10; |
It can be tedious (and slow) to go from a test in your editor to running that test in the browser. This is a process to speed this up slightly. When it's set up you'll be able to run an individual test by:
T'test ' (sans quotes), paste your clipboard and hit enter| if Rails.env.development? | |
| require 'active_record/connection_adapters/postgresql_adapter' | |
| require 'pygments' # add `gem 'pygments.rb', require: false` to Gemfile | |
| module ExplainAnalyze | |
| @@use_explain_analyze = false | |
| def explain_analyze | |
| @@use_explain_analyze = true |
| " Apparently some vim environments require colons before commands in | |
| " .vimrc and others don't. This file has been primarily tested in | |
| " Ubuntu 12.04, 13.10, and 14.04 environments, where a : is required | |
| " on each line before a command. According to one stackexchange topic | |
| " it is best to leave the leading colons because systems that do not | |
| " require them can still execute them. | |
| " Author - Trent Robbins | |
| " Turn arrow keys off: | |
| " To cycle history in `ed` mode, use C-n and C-p (although up and down might work fine) |
| Preparation | |
| Purchase YubiKey NEO | |
| Install X Code and Command Line Tools, if installing anything from source. | |
| X Code can be installed from the App Store. | |
| Command Line Tools are installed from X Code: X Code -> Preferences -> Downloads -> Components -> Command Line Tools. | |
| Install YubiKey reader library libyubikey (aka yubico-c) | |
| Using homebrew: | |
| brew install libyubikey | |
| brew install ykpers |